Hello:
I am trying to use the BAM module in MPC5634, right now I can download the code into the RAM, however, the code is not executed.
I use the CodeWarrior to write program code, and compile the program in CodeWarrior, the compilation result is a Motorola type S record file.
In the S record file, I found the program start point address is different with the first address the code stored in the RAM (the BAM should branch to that address after all code is downloaded), is that the reason the code is not execued?
Does anyone have this kind of experience? Or have a successful example?
Thank you!
Hi superthh,
I use GHS Multi IDE to generate a .bin file; maybe, take a look on the .prm file to check memory sections used by CW.
Regards,
Andrea
Hi, Ziomocci:
Thank you for your suggestion.
I checked the memory section in the map file complied from the project, and found that:
"_start()" code is set at 0x400050cb, and this code is the entry poin of initialization, it will call other initialization codes, for example, initialize the e200z335 and call "main()". Those initialization codes called by "_start()" are stored from 0x40000000 to 0x400050ca,
The BAM will branch to 0x40000000 when it finished the download. So this can't work? any suggestion about this?
Thank you!
ziomocci wrote:
Hi superthh,
I use GHS Multi IDE to generate a .bin file; maybe, take a look on the .prm file to check memory sections used by CW.
Regards,
Andrea
Well, I do not know what you wish do with your firmware downloaded via BAM; in my case, FW is very very simple because it contains just driver CAN, driver flash and a state machine to catch and process CAN messages sent from an external application, developed by myself using Visual C++ 6.0. When it starts run, I send CAN messages _using a Kvaser USBIICAN box_ which contains actual firmware to be programmed in flash memory (eg, I can send a boot.bin to be flashed from 0x0000_0000 to 0x_0003_0000, or an main_app.bin to be flashed from 0x0004_0000 to 0x0009_0000, take these values just an example).
In a poor words, I use BAM program to send a sort of bootloader to be programmed in RAM, then it start and with this bootloader I am able to erase, program and read flash memory.
It seems strange for me that _start() is set @0x400050cb and not @40000000; have you checked the .prm memory map file used by Codewarrior? I have never used it for PPC copntrollers, just for 8-bit secundary controller, but I think that the way to handle memory it is the same.
Attached snapshot shows what I do with BAM.
let me note if you need information sent, but as noted above, first I check the correctness of the file. prm
Hi, Ziomocci:
My code download to BAM just a test program, and it will set two GPIO pins of MPC5634 high voltage.
Yes, I changed some linker configuration in CW to make the "main()" as entry poin when I complie the project.
Right now, my test code starts run.
Thank you for your kindly help!!
Hi Thalpha...
I am trying to download via CAN my user code into an MPC5534EVB (enaugh similar to MPC5554EVB) using a little app developed with KVaser SDK; I am finding few problems; first of all I am not very sure that switch configuration is correctly [RSTCFG=1, BOOTCFG0=0, BOOTCFG1=1, PLLCFG0=0, PLLCFG1=0, WKPCFG=0] for serial mode activation, and on the other hand I have not find a relationship between baud rate (working at 8MHz it should be 200Kbaud) and bit time settings (tseg1, tseg2, etc...) of CAN specifications.
I think instead that pairs baudrate:bit_time_cfg shall be used to communicate via FlexCAN.
Have you found any solution?
Thank you in advance
Andrea Mocci,
SW developer @ Akhela s.r.l. Cagliari, Italy
Does anyone know of PC software to download firmware via BAM? Thanks.
Hi everybody,
You can use CAPL language with Vector CANalyzer, CANoe, etc, etc; also Omnitracer allows you to create script to download firmware via BAM; personally, two years ago I developed a visual studio application, but you need a KVaser USBIICAN hw to use it.
Regards,
Andrea