I'm new to sdcc. When I compile a very small source file I get a hex file with a lot of "startup" code in it. The "startup" code does not show up in the list file which makes debugging more difficult.
What option do I use to get all the code to show in the list file?
I tried but I just can't find the right option. Please help.
You can't. The linked in startup code comes from separate objects in the library. But you can look at the asm sources in the library source directory (…\SDCC\lib\src\mcs51). They are also present in the manual.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm new to sdcc. When I compile a very small source file I get a hex file with a lot of "startup" code in it. The "startup" code does not show up in the list file which makes debugging more difficult.
What option do I use to get all the code to show in the list file?
I tried but I just can't find the right option. Please help.
my source file:
test.c
#include <8052.h>
void main(void) {
P1 = 0x55;
}
complie with:
sdcc test.c
list file:
test.lst
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.9.0 #5416 (Mar 22 2009) (MINGW32)
You can't. The linked in startup code comes from separate objects in the library. But you can look at the asm sources in the library source directory (…\SDCC\lib\src\mcs51). They are also present in the manual.
have a look at: 3.12.1 MCS51/DS390 Startup Code