John Pote schrieb:
Does the compiler or utils have some means to output this format rather
than the usual Intel hex? (If not I'll knock up a Python script and pass
it on here if anyone else should be interested - but why re-invent the
wheel if it's already done.)
for the Python programmer: the msp430.memory module has functions to
load and store elf, hex and ti-text.
This is the frontend tool (also included in the latest win32 installer):
http://cvs.sourceforge.net/viewcvs.py/mspgcc/python/ihex2titext.py?rev=1.4&view=auto
easy enough?
For testing code snippets they can be run in the RAM using the Ti serial
monitor (or the replacement I developed). Can the compiler be configured
to a) not output the interrupt vector stuff at all ( for non interrupt
snippets)
browse the files here:
http://cvs.sourceforge.net/viewcvs.py/mspgcc/jtag/funclets/
msp430xRAM.x is a linker script that places all data in the RAM
(you may need to edit the start at 0x0220 instead of 0x200 for the BSL
as it allocates the stack there)
you see in the makefile, that the -T option can be used to load this
alternative linker script. if you call msp430-gcc (instead of -ld)
(untested):
msp430-gcc -Wl,-T,msp430xRAM.x -o binary.elf source.c
or b) place the vector table at the top of RAM where the
monitor, with a few extra cycles delay, passes interrupts on via ( for
interrupt needing snippets).
i ususaly use code that polls the interrupt flags instead of the real
interrupt handlers, because i don't want to reprogram the flash segments
chris