-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDCC function _sdcc_external_startup will be changing to __sdcc_external_startup #9
Comments
Yes, I noticed that a few weeks ago. For now, I've been using this in some of my projects:
But that is pretty ugly. Maybe @spth has some ideas for a better way to handle this (ideally some kind of backward compatibility inside SDCC itself? I suppose worst case we could to a conditional define in one of the common header files to implement backwards compatibility with a compiler warning maybe. Something like this (in one of the include files) would probably work:
But, that won't help someone that just updates SDCC without pulling in new include files. |
I would predict that it's unlikely. Unfortunately for the PDK platform, the init code is generated by the compiler, rather than like on some other platforms where it is a separate, override-able, crt0 library that's linked in, so defines are probably going to be the only option. Your solution involving the include file warning sounds good to me. Maybe reverse it so that it warns to update the version of SDCC. BTW, I was motivated to file this issue because I have been referring to the FreePDK website documentation while putting together a patch to unify |
This issue was causing the following error for me. Posting here so that others who run into this while getting started might find it, and then can fix it pretty easily
I've also submitted a PR that should fix this by adapting the macro that Serisman shared above (I've only tested it with sdcc version 4.3.0 but it's pretty straight forward) |
Some advance warning: as of current SDCC development version 4.2.10, and for the forthcoming release version 4.3.0, the
_sdcc_external_startup
function has been renamed to__sdcc_external_startup
(note the additional underscore at the beginning). See SDCC feature request #859.This means all the examples in this repository that define a function with the former name will no longer work properly, because the function will not be called. Also, the failure may be entirely transparent, because SDCC may not warn about an unused function.
Perhaps old and new versions of SDCC can be accommodated with some conditional defines?
The text was updated successfully, but these errors were encountered: