473,699 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help about compile with st20cc.exe

4 New Member
Hi to all,
I have question about compile with st20cc.exe
How can compile one source code with st20cc.exe???
Example:
Expand|Select|Wrap|Line Numbers
  1. /* Includes --------------------------------------------------------------- */
  2. #include "emu.h"
  3. #include "crypto.h"
  4. #include <string.h>
  5.  
  6. //---------------------------------------------------------------------------
  7.  
  8. int conax_ecm (byte *ecm, byte *dw, byte *emu_buf) {
  9.     int keyIdx;
  10.     byte *e,*n;
  11.  
  12.     if(!emu_buf[0x20A]) return false; // send to card
  13.     keyIdx=ecm[6];
  14.     if(keyIdx==emu_buf[0xEF4]) {
  15.         e=emu_buf+0xEF6;
  16.         n=emu_buf+0xF76;
  17.     }
  18.     else if(keyIdx==emu_buf[0xEF5]) {
  19.         e=emu_buf+0xF36;
  20.         n=emu_buf+0xFB6;
  21.     }
  22.     else return false; // key not found in emu
  23.     return ( conax_decrypt (ecm+7,(int)ecm[4]-2,e,n,dw) );
  24. }
  25.  
  26. int conax_decrypt (byte *buf, byte len, byte *e1, byte *n1, byte *plainwords) {
  27.     int i, j, num, index, nDigits, eDigits;
  28.     const byte hash[] = {0x05, 0x00, 0x05};
  29.  
  30.     NN_DIGIT N1[MAX_NN_DIGITS], E1[MAX_NN_DIGITS], ecm[MAX_NN_DIGITS], decm[MAX_NN_DIGITS];
  31.  
  32.     NN_Decode(N1,MAX_NN_DIGITS,n1, 64);
  33.     NN_Decode(E1,MAX_NN_DIGITS,e1, 64);
  34.     nDigits = NN_Digits (N1, MAX_NN_DIGITS);
  35.     eDigits = NN_Digits (E1, MAX_NN_DIGITS);
  36.  
  37.     // begin RSA decrypt
  38.     if (buf[-2]==0x63) num = 1;
  39.     else num = 0;
  40.     for (i=len;i>0;)  {
  41.         index = i-64;  
  42.         if(index < 0) index = 0;
  43.  
  44.         NN_Decode(ecm,MAX_NN_DIGITS,buf+index,64);
  45.         R_memset((POINTER)decm,0,sizeof(decm));
  46.         NN_ModExp(decm,ecm,E1,eDigits,N1,nDigits);
  47.         NN_Encode(buf+index,64-num,decm,MAX_NN_DIGITS);
  48.         if(num) {
  49.             len=len-num;
  50.             for(j=index+64-num; j < len; j++) buf[j]=buf[j+num];
  51.         }
  52.         if (i>120){
  53.             if (i%60) i-=i%60;
  54.             else i-=64;
  55.         }
  56.         else i-=64;
  57.     }
  58.     if(memcmp(hash, buf+2, 3) == 0 &&  memcmp(buf+5, buf+len-5, 5) == 0) {
  59.         /* Signature correct, parse decrypted packet */
  60.         ParseECM(buf+10,len-10,plainwords);
  61.         return true;
  62.     } else return false;    // Signature incorrect
  63.  
  64. }
  65.  
  66. void ParseECM (byte *buf, byte len, byte *plainwords) {
  67.   int i;
  68.   for(i=0; i<len; ) {
  69.     byte nano = buf[i++];
  70.     byte nanolen = buf[i++];
  71.  
  72.     switch(nano) {
  73.     case 0x80:
  74.     case 0x82:
  75.       ParseECM(buf+i+3, nanolen-3, plainwords);
  76.       break;
  77.     case 0x81:
  78.       ParseECM(buf+i+2, nanolen-2, plainwords);
  79.       break;
  80.     case 0x30:
  81.       if(plainwords) {
  82.                 memcpy(plainwords, buf+i+10, 8);
  83.                 memcpy(plainwords+8, buf+i+2, 8);
  84.             }
  85.       break;
  86.     default:
  87.       break;
  88.     }
  89.     i += nanolen;
  90.   }
  91. }
Please help me,
Jan 22 '07 #1
7 3863
SatX
4 New Member
I performed this But I cannot compile it
Expand|Select|Wrap|Line Numbers
  1.  st20cc: ST20
  2. ST20 Toolchain driver ...
  3.  
  4. Usage: st20cc <filename> {-option}
  5. Options include: 
  6. F                 run only C++ preprocessor and C++ compiler
  7. I <directory>     Specify include directory
  8. NS                do not include default startup file to linker
  9. O0                disable optimization
  10. S                 produce assembly language
  11. T <scriptfile>    specify linker indirect file
  12. c                 suppress linking
  13. g                 comprehensive debugging data
  14. o <filename>      specify output file
  15. off <type>        format <type> of the output file to be produced
  16. p <procedure>     specify command procedure to execute
  17. v                 verbose mode
  18. w                 suppress all compiler warnings
  19.  
  20. A complete option list is provided by the help option
  21. Default options may be placed in the environment variable ST20CCARG
How can compile C Source code to Binary file(.bin)???
Jan 22 '07 #2
Banfa
9,065 Recognized Expert Moderator Expert
The command line you want is

st20cc <filename>.c

However the code you have provided is not a complete program so you can not link to a bin.
Jan 23 '07 #3
SatX
4 New Member
The command line you want is

st20cc <filename>.c

However the code you have provided is not a complete program so you can not link to a bin.
Ok thanks But Can you explain or instruction compile source code to .bin with st20cc.exe?!?!?

I need to help you,
Jan 23 '07 #4
Banfa
9,065 Recognized Expert Moderator Expert
My memory of using the ST20 Toolset is that we used st20link.exe to link all the objects created with st20cc.exe (using the -c, compile only switch) to create a binary image.

The dedicated linker program has many options and I think you will need to look them up in the documentation (which is available in the compiler program tree).
Jan 23 '07 #5
SatX
4 New Member
My memory of using the ST20 Toolset is that we used st20link.exe to link all the objects created with st20cc.exe (using the -c, compile only switch) to create a binary image.

The dedicated linker program has many options and I think you will need to look them up in the documentation (which is available in the compiler program tree).
I have ST20 Toolset v1.8.1 & v1.9.6 But I have problem in use of st20link.exe to link all the objects created with st20cc.exe who switch C source to .bin

Can you guide me to use of st20link.exe to link all the objects created with st20cc.exe and compile C source to .bin please???

I amnot an expert
Jan 23 '07 #6
ALSFelix
1 New Member
Hi.

Can anyone help me to aquire the latest versions of these softwares:

# SGS-Thomson Transputer ANSI C Toolset
# SGS-Thomson Transputer Occam 2.1 Toolset
# SGS-Thomson C++ for ST20 and T4/T8 Transputers

I have some but they are very old and i can't find new ones.
I've asked for help from SGS-Thomson but all thet tell me is to contact some company called ARROW but dont tell me how and i can't find them...

Can anyone help me?

Thank you.
Oct 27 '07 #7
Banfa
9,065 Recognized Expert Moderator Expert
About 2 minutes with Google got me http://www.arrowne.com/arrow_worldwide/uk/main.html who seam to meet the 2 criteria of being called Arrow and being an ST-Microelectronic supplier.
Oct 27 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

21
6546
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help Workshop program: hcw.exe that's included with Visual Basic. This exact same file compiled perfectly with no notes, warnings or errors prior to reformatting my system. Prior to the reformatting, I copied the help.rtf file onto a CD and checked the box to...
5
2144
by: xuatla | last post by:
Hi, I encountered the following compile error of c++ and hope to get your help. test2.cpp: In member function `CTest CTest::operator+=(CTest&)': test2.cpp:79: error: no match for 'operator=' in '*this = CTest::operator+(CTest&)((+t2))' test2.cpp:49: error: candidates are: CTest CTest::operator=(CTest&) make: *** Error 1
8
5473
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I debug it in PHP designer, it works with no problems, I get the test email. If
2
23941
by: bradleyp | last post by:
Hi all, Hopefully somebody can help. In Access 2002-SP2, I receive an error from the VB Editor if I try to compile the following code (see below). The error is as follows: Compile Error: Method or data member not found The follow subroutine is highlighted (specifically .txtNR_Program1):
4
1695
by: Chronologic | last post by:
All, I have an issue I would like some expert help on. I understand, or so I believe, that C# does not support the concept of a "compile time macro". At least not in the sense I'm looking for. While many users contend that macros are inherently evil, I would argue that no - they are not, they have a function. That function is sometimes -- perhaps much too often -- abused, but they do have a
4
8461
by: livin | last post by:
my log... INFO urllib.urlopen('http://192.168.1.11/hact/kitchen.asp', urllib.urlencode({'Action': 'hs.ExecX10ByName+Kitchen+Lights%2C+On %2C+100&x=4&y=6'})) INFO INFO File "Q:\python\python23.zlib\urllib.py", line 78, in urlopen INFO File "Q:\python\python23.zlib\urllib.py", line 159, in open INFO File "Q:\python\python23.zlib\urllib.py", line 957, in splittype INFO AttributeError
2
1573
by: MLH | last post by:
I did these 4 steps to create a topic file 1 Open a new file in a word processor or text editor that can handle rich text format. 2 Write your individual topics, separating each topic with a hard page break. 3 Add appropriate footnotes at the beginning of the file. See Related Topics below. 4 Save the file in rich text format with the .rtf filename
1
3712
by: Rahul | last post by:
Hi Everybody I have some problem in my script. please help me. This is script file. I have one *.inq file. I want run this script in XML files. But this script errors shows . If u want i am attach this script files and inq files. I cant understand this error. Please suggest me. You can talk with my yahoo id b_sahoo1@yahoo.com. Now i am online. Plz....Plz..Plz...
17
2174
by: Nirjhar Oberoi | last post by:
Hi, I am new to Linux and wanted to know how to use GCC to Compile the Code written in C? I dont want to use EMacs or VI for my editor. Can you suggest a good IDE for linux for C Programming.. Does C Programming on windows environment and on linux environment differ??? Thank you.
0
8686
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8615
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9173
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9033
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8911
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8882
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7748
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6533
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5872
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.