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

cpu/stm32f0 C++ stmf0discovery support fix #1987

Conversation

BytesGalore
Copy link
Member

Using the promoted gnu toolchain provides newlib with a _kill_r() implementation conflicting with the RIOT one, so I removed _kill_r() from RIOT.
The shipped newlib requires to provide a _kill() function when using g++, so I added a stub for it.

@BytesGalore BytesGalore mentioned this pull request Nov 11, 2014
@BytesGalore BytesGalore force-pushed the EasyCPPMixing_stm32f0discovery_support_fix branch from fb74dd4 to d402fde Compare November 11, 2014 09:29
@BytesGalore BytesGalore changed the title cpu/stmf0 C++ stmf0discovery support fix cpu/stm32f0 C++ stmf0discovery support fix Nov 11, 2014
@BytesGalore BytesGalore added Area: C++ Area: C++ wrapper Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation labels Nov 11, 2014
@@ -324,3 +309,5 @@ int _unlink_r(struct _reent *r, char* path)
r->_errno = ENODEV; /* not implemented yet */
return -1;
}

void _kill(void) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please comment the stub?!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do, btw. it has wrong parameter prototype, should be _kill(int pid, int sig)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx

@BytesGalore BytesGalore force-pushed the EasyCPPMixing_stm32f0discovery_support_fix branch 2 times, most recently from dbcf1bd to 03905f6 Compare November 11, 2014 14:18
@haukepetersen
Copy link
Contributor

@BytesGalore just trying out your changes by building the examples/riot_and_cpp application. Is there anything specific I have to do to my toolchain to make is work, as in installing another version of the newlib or something? When building I get

/home/hauke/dev/riot/RIOT/examples/riot_and_cpp/cpp_class.hpp:26:18: fatal error: cstdio: No such file or directory
 #include <cstdio>

any idea what I am doing wrong here?

@BytesGalore
Copy link
Member Author

@haukepetersen this error might result from your toolchain version.
For instance the last standard toolchain did fail to ship the c++ headers such as the cstdio.

The followed gcc version 4.8.4 20140725 (release) [ARM/embedded-4_8-branch revision 213147](GNU Tools for ARM Embedded Processors), i.e. q3, fixed that bug.

@haukepetersen
Copy link
Contributor

hm, ok. I will try to update my toolchain and see how far I get.

@BytesGalore
Copy link
Member Author

I hope until ;)
INFO # This demo ends here, press Ctrl-C to exit (if you're on native)!

@BytesGalore BytesGalore force-pushed the EasyCPPMixing_stm32f0discovery_support_fix branch 2 times, most recently from 6af2f3f to 6007fe8 Compare November 14, 2014 07:40
@haukepetersen
Copy link
Contributor

Works, ACK when squashed

@BytesGalore BytesGalore force-pushed the EasyCPPMixing_stm32f0discovery_support_fix branch 2 times, most recently from f77129a to 4acafb3 Compare November 14, 2014 10:27
…k attribute for _kill_r

boards/stm32f0discovery: provided c++ feature (cpp)
@BytesGalore BytesGalore force-pushed the EasyCPPMixing_stm32f0discovery_support_fix branch from 4acafb3 to 3154bc8 Compare November 14, 2014 12:28
@haukepetersen
Copy link
Contributor

and go.

haukepetersen added a commit that referenced this pull request Nov 17, 2014
…ery_support_fix

cpu/stm32f0 C++ stmf0discovery support fix
@haukepetersen haukepetersen merged commit 594d925 into RIOT-OS:master Nov 17, 2014
@BytesGalore BytesGalore deleted the EasyCPPMixing_stm32f0discovery_support_fix branch November 25, 2014 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: C++ Area: C++ wrapper Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants