Prev: Tiny Bootloader
Next: Link&Locate 86?
From: Dave on 8 Sep 2006 20:29 On Fri, 08 Sep 2006 01:56:50 -0400, CBFalconer wrote: > Dave wrote: >> >> The C code is a recent addition and is used only for CAN communications. >> Of the C compilers I have looked at for 68K use (Diab, Metrowerks), none >> could generate 68K code to compete with the M-GM compiler. > > Assuming M-GM is a real Modula system, it should also save you much > wailing and gnashing of teeth over silly errors. It is a real Modula. It was developed by Intermetrics from Modula-II and incorporated features from other languages (e.g., fixed-point math from Ada--you didn't get cheap processors with FPUs). It did save us from ourselves many times. ~Dave~
From: Dave on 8 Sep 2006 20:35 On Fri, 08 Sep 2006 09:24:35 -0400, Walter Banks wrote: > We wrote the C compiler for thread based engine controller that > was used to program most of the current automotive engines > (eTPU). Walter, at the large auto supplier I used to work at (hint: currently in bankruptcy) none of the products used the eTPU AFAIK. We were doing validation on a new controller intended for the diesel truck market that used the new Copperhead processor which has the eTPU. ~Dave~
From: Dave on 8 Sep 2006 20:52 On Fri, 08 Sep 2006 15:02:14 +0000, Joerg wrote: > Well, I should have mentioned that I meant turbines but in car engines > there are also some routine that need to be really fast, like the knock > sensor handling. I hate to disappoint you again, Joerg, but the knock sensors were handled in M-GM also. And, unlike some functions (spark, fuel, engine timing signals) which used the TPU, the knock sensors were controlled by the M-GM code with no use of the TPUs. Sorry. ;-) Aside from the areas I previously mentioned, I remembered one more area where we did use assembly (and I wrote it so I shouldn't have forgotten): flash programming at ECM shutdown. About six seconds after key off, the ECM will begin a shutdown process which includes saving some data into flash. The two routines (one for each brand of flash the ECM might have) are coded in assembler since they have to be relocated to RAM for execution. Assembler was used to guarantee position independence of the code, not for any speed or size considerations. ~Dave~
From: Yuriy K. on 8 Sep 2006 22:24 Dave wrote: > Aside from the areas I previously mentioned, I remembered one more area > where we did use assembly (and I wrote it so I shouldn't have forgotten): > flash programming at ECM shutdown. About six seconds after key off, the > ECM will begin a shutdown process which includes saving some data into > flash. The two routines (one for each brand of flash the ECM might have) > are coded in assembler since they have to be relocated to RAM for > execution. Assembler was used to guarantee position independence of the > code, not for any speed or size considerations. This is another example of the occasional assembler usage. But even in this case it's just a poor C compiler. I did some flash programming routines for HC08/HC12 cores. Some compilers can generate relocatable code, some can't and you have to use assembler. And again, only the actual programming function is written in assembly, the rest is still in plain old C. Or C++ for that matter... -- WBR, Yuriy. "Resistance is futile"
From: Vladimir Vassilevsky on 9 Sep 2006 11:20
Yuriy K. wrote: > I did some flash > programming routines for HC08/HC12 cores. Some compilers can generate > relocatable code, some can't and you have to use assembler. It is a business of a linker to generate a section of code to be executed from any specified location in the address space. I am sure all linkers can do that. Some linkers can make the location of execution different from the location where the code resides, the others can't. However you can always manipulate with the hex files. > And again, only the actual programming function is written in assembly, > the rest is still in plain old C. Or C++ for that matter... I did the bootloaders for HCS12 and for TMS28xx completely in C without any problems... Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com |