Skip to content
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

Libraries #3

Open
spth opened this issue Nov 5, 2019 · 1 comment
Open

Libraries #3

spth opened this issue Nov 5, 2019 · 1 comment

Comments

@spth
Copy link

spth commented Nov 5, 2019

https://github.com/XaviDCR92/stm8-dce-example states:

SDCC's Makefile compiles libc and other libraries in its own object format (*.rel), so the sources must be moved to the project and compiled separately using the GNU toolchain. Otherwise, you will get an undefined reference link-time error when performing some operations such as integer division. This will be solved once these forks are integrated into the main branch.

How would this be resolved? Have another set of stm8 libraries (i.e. like we now have stm8 and stm8-large, there would also be stm8-gas and stm8-gas-large)?

@XaviDCR92 XaviDCR92 assigned XaviDCR92 and unassigned XaviDCR92 Nov 6, 2019
@XaviDCR92
Copy link
Owner

That would be a feasible solution. I did not dare to modify the Makefile in "device/lib" as it seems to be closely tied to SDCC's default file extensions (.rel for object files and .lib for static libraries) and didn't want to break even more things. Instead, two new targets should generate .asm (in GNU as format), .o object files and .a static libraries so stm8-ld can link them.
Are you willing to modify this Makefile accordingly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants