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

Unable to compile blink project when board Maple(RET6) is selected from Arduino studio #42

Closed
yuanb opened this issue Jul 19, 2020 · 7 comments

Comments

@yuanb
Copy link

yuanb commented Jul 19, 2020

Hi,

I hope this is the right place to log this issue, if not please close this issue and tell me where to log it

Environment:
OS: Mac OS X
Arduino Studio 1.18.12
STM32duino: 2020.6.20
Board: Leaflabs Maple RET6
Additional Board Manager URLs: http://dan.drown.org/stm32duino/package_STM32duino_index.json

Please check attached image for details. The same code compiles fine when Maple Rev3 is selected.
My remedy is to add the following to the beginning of Arduino15/packages/stm32duino/hardware/STM32F1/2020.6.20/cores/maple/sdio.cpp. Sample blink project, rtos blink project compiled and runs fine with this change.

Note, if I uncomment the #ifdef __cplusplus block, the code wont compile, same error.

//#ifdef __cplusplus
// #include
// using namespace std;
//#else // C
#include <stdlib.h>
#ifndef min
#define min(a,b) ((a)<(b)?(a):(b))
#endif // min

#ifndef max
	#define max(a,b) ((a)>(b)?(a):(b))
#endif // max

//#endif // __cplusplus

Screen Shot 2020-07-19 at 3 35 53 PM

Board manager dialog:
Screen Shot 2020-07-19 at 4 03 09 PM

@yuanb yuanb changed the title Unable to compile blink project when board Maple(RET6) is select from Arduino studio Unable to compile blink project when board Maple(RET6) is selected from Arduino studio Jul 20, 2020
@stevstrong
Copy link
Owner

OK, I will have a look on this.

@stevstrong
Copy link
Owner

Your core files are from: http://dan.drown.org/stm32duino/package_STM32duino_index.json
This error is related to the Roger's core: https://github.com/rogerclarkmelbourne/Arduino_STM32
I think this is fixed by this commit: rogerclarkmelbourne@58ca12a
Please check out the new file sdio.cpp and try to compile again.

@yuanb
Copy link
Author

yuanb commented Aug 4, 2020

@stevstrong I don't understand how Arduino studio manage its packages. Are you saying I'm actually not using your code?

@stevstrong
Copy link
Owner

Yes, that is what I am saying.
If you want to use my core files, then you have to install it manually, identically as described here: https://github.com/rogerclarkmelbourne/Arduino_STM32/wiki/Installation
just that the package you have to download is this one: https://github.com/stevstrong/Arduino_STM32/archive/master.zip

@yuanb
Copy link
Author

yuanb commented Aug 5, 2020

I have tried both. Roger's core downloaded from this link, worked.
https://github.com/rogerclarkmelbourne/Arduino_STM32/archive/master.zip

Your master core failed with some errors
failed

@stevstrong
Copy link
Owner

stevstrong commented Aug 6, 2020

It is good that it works with Roger's core, use that, you don't need to use my core, I do not support all board types.
Can you please post the error messages as text?

@stevstrong
Copy link
Owner

I will close this as it seems to be resolved.

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