Does the workaround work for you?
A nn.S and nn.s files are assembler code (the .S is passed to the preprocessor first to expand macros etc.)
If you look at your .build directory (when -save-temps is set) you will see that your .xc and .c files are first compiled into .s files.
Adding -v (verbose) will show you the chain of commands that xcc runs for you viz: calls xcc1llvm (.xc->.s), xcc2clang (.c->.s), xas (.s->.o) and finally xmap (.o->.xe).
The xcc1llvm compiler was correctly emitting
.set lib_startKIT_adc_client.select.y.enable.cases,0
but was failing to make it global.
The error was coming from the linker (xmap) as it could not find a global symbol!
The workaround does what the compiler should have done - thus keeping xmap happy.
I assure you, you don't want to know about the 'lib_startKIT_adc_client.select.y.enable.cases' symbol :-)
robert
Multiple returns from read-type call to task Topic is solved
-
- XCore Addict
- Posts: 169
- Joined: Fri Oct 23, 2015 10:23 am
-
- XCore Expert
- Posts: 512
- Joined: Wed Apr 25, 2012 8:52 pm
Yes, making the globl_bug_fix.S with your content did remove the linker error. Thanks.robertxmos wrote:Does the workaround work for you?
A nn.S and nn.s files are assembler code (the .S is passed to the preprocessor first to expand macros etc.)
If you look at your .build directory (when -save-temps is set) you will see that your .xc and .c files are first compiled into .s files.
Adding -v (verbose) will show you the chain of commands that xcc runs for you viz: calls xcc1llvm (.xc->.s), xcc2clang (.c->.s), xas (.s->.o) and finally xmap (.o->.xe).
The xcc1llvm compiler was correctly emitting
.set lib_startKIT_adc_client.select.y.enable.cases,0
but was failing to make it global.
The error was coming from the linker (xmap) as it could not find a global symbol!
The workaround does what the compiler should have done - thus keeping xmap happy.
I assure you, you don't want to know about the 'lib_startKIT_adc_client.select.y.enable.cases' symbol :-)
robert
But commenting away the "ENABLE_STAGED_BUILD=0" in the makefile still gets me the "xcc1: terminated due to internal unrecoverable error" as reported in #8810. But then, I wasn't sure if you were treating this or that or both matters. But we're one more step ahead!-)
-
- XCore Addict
- Posts: 169
- Joined: Fri Oct 23, 2015 10:23 am
There are two bugs, so you do need the two workarounds.
Glad they are both working for you.
Robert
Glad they are both working for you.
Robert