Hi
using some HCS08 chip
Putting code on it is easy
but I would like to know if its possible to have the debugger put 16Kb of a file inside the cpu flash at a static address?
like a script that program that file into memory atm of flashing code for debugging?
this way I could get that 16Kb data from the microcontroller (to send it with SCI).
Maybe it would be easier to include it in codewarrior
but I dont know how for any of the two method
someone know a good solution???
Solved! Go to Solution.
Hi Juls,
What form is your 16K of data in?
If it can be made into a .S19 file, then the linker will include it with the rest of your program if you specify a "HEXFILE" line in your .PRM file. I do this to have DSP firmware included with the code for the S08 to download into a DSP at power-up.
As the last two lines of my .PRM file, I have:
HEXFILE DSP,v3\Core0.s19
HEXFILE DSP,v3\Core1.s19
Hope that works for you.
Hi Juls,
What form is your 16K of data in?
If it can be made into a .S19 file, then the linker will include it with the rest of your program if you specify a "HEXFILE" line in your .PRM file. I do this to have DSP firmware included with the code for the S08 to download into a DSP at power-up.
As the last two lines of my .PRM file, I have:
HEXFILE DSP,v3\Core0.s19
HEXFILE DSP,v3\Core1.s19
Hope that works for you.
its binary
ill try to rename it and compile it for a cpu
does CW have a limit size? just not sure if it will count the 16KB file as "code"
and what is the actual addess the linker will put the hexfile? is at DSP in your example?
Hi Juls,
I don't know if there is a limit, but each of my DSP code images is 24k, so 16k will be fine.
The addresses used are specified in the .S19 file.
ok
then can you help me convert my 16KB binary to a s19 that place it at a know place in flash?
The burner.exe in prog can convert binary files to srecords. Just start it, it has a UI which helps for one time conversions. it also supports a command line interface, look for batch burner in the manuals, if you want to include the conversion into the build.
srecord content does not count against the C code limitation (just as assembly, for example).
Also, when I remember right, there is an optional offset for the HEXFILE prm command. Well there probably is a way in the burner to define a offset during the conversion as well.
Daniel
Daniel,
In the help files I see "Supports Freescale and ELF/DWARF Object File Format, S-Records and Intel Hex Files as input "
I don't see binary here. BTW there's no command for input file format. You can specify output file format, but input file format seems being autodetected. And when burner doesn't recognise input file format, it just errors.
Juls,
try googling for bin to hex BIN2HEX or BIN2S19 utility. There also should be some bin to C utility, which could convert binary file to C array initialization values like
char arr[]={1,2,3,4.. etc
I think it work with bin2s19
but the output file is 44K
in the input is 64K
i will have to compare them sound weird that the output is shorter ....
more news tonight
update:
bin2s19 seem to do a good job
sinde with s2bin i get the exact same result of the input file
so compiled a little project for JM60 (I have an eval board of it)
HEXFILE lb.txt OFFSET 0xBFAE it in
and also a rom segments for it
LBROM = READ_ONLY 0xBFAE TO 0xFFAD;
and in full chip simulation it have the file at 0xBFAE address
that trick seem to work good
Thanks all for the help
If i get other question dont worry ill be back
Thanks kef
I tried bin2hex
returned me an error on the lengh limit
but ill try again
i would like to avoid the giant 16kb static declaration in the code
Hi again
I did try it
seem that application could help
but when I say execute it tell me wrong input file...
if i upload it would you be able to test it and tell me how?
it say txt but its binay