CodeWarrior and Using SCI with DEMO908GZ60

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CodeWarrior and Using SCI with DEMO908GZ60

2,268 Views
hoangtu
Contributor I
Dear all,
Please help me.
I'm using CodeWarrior for HC08, on DEMO908GZ60 circuitry, with "Mon08 Interface" mode. When my code is loaded on Flash Memory and runned, after resarting, it cannot run again. So, is there some way for me to load my program permanently on the MCU ?
Finally, I cannot use SCI on this board. Can someone help me use this ?
Thanks.
:smileywink:
Labels (1)
0 Kudos
7 Replies

542 Views
J2MEJediMaster
Specialist I
Normally, CodeWarrior questions should go into the CodeWarrior forum, but since you asked about the SCI, I'm going to leave this thread here for now.

OK, have you tried building and downloading one the demo programs that came with CodeWarrior? Did it work after you cycled the board's power? If it did, and you program doesn't, then somehow you've broken the link between the reset vector and your program. Normally, the reset vector points to _Startup(), which performs the low-level initializations. _Start() function then calls main(), which you then have call your program. Are you using a project target that debugs out of RAM or actually loads into the firmware? Sorry for the basic questions. I'm just trying to gather the facts.

---Tom

0 Kudos

542 Views
hoangtu
Contributor I
Dear Tom,
Thanks for your answer.
I've tried a demo project from CodeWarrior CD, building, loading  and running it on the DEMO908GZ60 board. At the first time, it seems to be normal. However, after I press the reset button on the board, nothing happens, and it cannot run again.
I have the same result when I turn of the power and then turn it on again.
Is there anything wrong with this ?
Thanks.
:smileysad:

0 Kudos

542 Views
J2MEJediMaster
Specialist I
I'm only familiar with the HC(S)12 tools, so I'm speculating here. I'm wondering if the project is downloading to RAM rather than firmware. You might want to take a look a the memory map file the linker generates to see where the code is landing.

---Tom

0 Kudos

542 Views
Alban
Senior Contributor II
Dear Tom and HuangTu,

For the reset to work, you need to have programmed the Flash.
As Tom states, you probably only load the RAM content and the debugging info.

To update the content of your flash, in the debugger (HiWave), click on the target menu (MON08, PEDEBUG, or anythink like that).
Then press LOAD..., chose the S-Record or better (so you have debug info) take the ABS file.
In the option, chose to get the flash erased/programmed.

The programming should take longer than before as it is actually programming the Flash.

Good luck... even if non is necessary :smileyhappy:
Alban.
0 Kudos

542 Views
hoangtu
Contributor I
Dear Alban and Tom,
Thank you very much for your help.
My work has been delayed for some time for another task. I'm sorry for my lateness.
I have always done this, and I have always got the same message boxes saying something like "Loading program onto FLASH...". There are several steps requiring me to restart the board. However, the reault is always the same. I think maybe there are some problems with the hardware.
Thank you for your helps.
Now I'm about to develop a driver for CAN with this board, but I cannot find a way for the Unit Test and Integration Test. I think you have many experiences on developing some big programs on this, so could you please help me with this ? I really need some ways helping me testing what I have written. Are there any testing method to do this (like JUnit or CPPUnit...) other than loading my programs onto the board and test it manually ?
Thank you so much.
Newbie in Embedded System Programming
Hoang Tu :smileywink:
0 Kudos

542 Views
Alban
Senior Contributor II
Hello Hoang Tu,

I don't have experience in these testing software suites.
To avoid having to load the software in the chip each time, you could use the simulator of the debugger.
You can create a New Target in your project to be the CodeWarrior integrated Simulator for HC08.
The simulator will allow you to do more automation with the debugging/testing. For instance, you can give "test vectors" to test your software with different paramaters.
If you wish details on CodeWarrior functionalities, please post a message in the CodeWarrior for 8- and 16-bit board as all CodeWarrior questions should naturally be asked in a CodeWarrior board.

To do real testing of a CAN software, you will need a CAN Tester which you will take as a model.
A CAN emulator is very useful for this and will provide you the functions you need to generate all type of traffic to test your software in different scenarios.

Buying a CAN Emulator could be a costly option, depending on the amount of test you wish to perform. It might be judicious to buy the CAN drivers already completed so you don't spend time writting and testing them.

Regards,
Alban.
0 Kudos

542 Views
hoangtu
Contributor I
Dear Alban,
Thank you for your help.
I think I got it.
Thanks and regards,
Hoang Tu
0 Kudos