cancel
Showing results for 
Search instead for 
Did you mean: 

ERROR from SDCC Linker - "?ASlink-Warning-Undefined Global 'null' referenced by module 'main'"

flankerus
Associate II

$ sdcc -mstm8 --out-fmt-elf -o build/firmware.elf build/{main.rel,uart3.rel,misc.rel}

?ASlink-Warning-Undefined Global 'null' referenced by module 'main'

What is meaning?

Module "main.rel" was compile without errors/warning.stm8-gdb has segfault when i load this elf :(

2 REPLIES 2

Perhaps you have some object dumping tools, or you can look for correlating data in the .MAP or .LST files.

>>Module "main.rel" was compile without errors/warning.

You understand that means Very Little, simply that the code appears syntactically correct, not that it is functionally correct, or sufficient to get closure in the linker.

Perhaps use bi-section techniques to isolate the portion of code involved, or the delta from the last code that compiled and linked properly.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

>Perhaps use bi-section techniques to isolate the portion of code involved, or the delta from the last code that compiled and linked properly.

yeah, i was figure out with it!

"static uint16_t tick=0"

using a static variable in the main loop broke the build project in ELF format

fixed it through replace to local variable. Thanks for answer!