Cosmic UK Cosmic US Cosmic Germany Cosmic Italia Cosmic France


Cosmic Software Frequently Asked Questions


How do I extract S-Records for just a segment of code or data?


First, the segment in question must be named using the -n option in the linker command file. Then you can use the -n option on chex to specify the desired segment(s) to be extracted from the Cosmic executable.
+seg .eeprom -b0x1000 -neeprom_seg
Link the application as usual so that the linked executable contains all of the segments in the project. Then use chex utility to extract the named segment using the -n option.

HC12 Example
clnk -otest.h12 test.lkf
chex -neeprom_seg -oeeprom_seg.s19 test.h12
Chex can also be used to output all segments except for certain named segments using the -x option.
chex -xeeprom_seg -oall_but_eeprom.s19 test.h12