Closed sealj553 closed 4 years ago
Oh, by the way
static const char *str = "hello world";
fails to link, but
static const char str[12] = "hello world";
works. So that's fine as a workaround, but I am still unable to use inline strings.
This issue was also reported by a member from the ST community and was fixed on this commit: https://github.com/XaviDCR92/sdcc-gas/commit/40ce43b7aec0aaf96770412d041ede6bf0f0573d Update your sdcc-gas copy and you should no longer have this issue.
I didn't realize there was another commit since I cloned it. All working now, thanks.
Hi, Thanks for the example. I finally got the SPL compiled and linked after figuring out the issue with
__divulong
and other SDCC library functions.My last issue is that the linker doesn't seem to be able to find any strings. I modified this example to demonstrate:
Which produces the following output:
It's definitely there in
main.asm
:Do you happen to know what might cause this issue or if there are any workarounds? I can't tell if this might be a bug with sdcc-gas/stm8-ld or if there's a tweak needed to the linker script...
P.S. I'm using the STM8L151F2. In my project, I modified the example linker script to match the flash, stack, etc. values for my chip. It looks like the memory map should be the same for all STM8s. There shouldn't be anything else needed to port it, right?