-
Notifications
You must be signed in to change notification settings - Fork 8
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
STM32: compilation error: no SELECT methode #3
Comments
For the STM32 you may be better off using the full featured OpenMRN library instead, this will entail moving away from the simpler Arduino APIs but it will likely be better in the long run. |
I have not tried compiling for the STM32 in the arduino environment in a
very long while. The support was never fully complete (in particular there
are dependencies ofthe current codebase on fd based file access APIs which
were never given on an Arduino -- the ESP32 is the only example where we
have it). We definitely do not have the FreeRTOS related parts of OpenMRN
ported to the Arduino compilation; this is why we call it OpenMRNLite.
I do a lot of compilation for STM32 natively under linux, but that's not a
good option under windows (lack of make and related utilities). Maybe the
linux subsystem would help but I have no experience.
In short what you are trying to do is not something someone before you did,
so there will be bumps on that road -- it needs work. If you are willing to
do that work, I will be happy to help.
Specifically, the select part needs to be disabled in STM32. When running
under the Arduino environmenmt we should be exercising the path that's
larked as SINGLE_THREADED. There is a bug in the code you quoted because it
does not have the #ifdefs correctly to work in the that path. That bug
needs to be fixed first to compile.
There will probably be more problems.
|
@adrianban Can you please test with the latest update which adds the STM32 support to this library? |
Yes, sure! I will give a try this evening. |
Hi, I've success to compile on NUCLEO-144 F767ZI:
On the other hand if I'm trying to compile on NUCLEO-64 F446RE F452RE is not working:
Those 2 boards they have CAN bus also, so theoretically should compile the library on those chips. |
after this line add:
That might take care of F446RE and L452RE (couldn't find an entry for M452RE in the stmduino boards.txt file). |
Hi @atanisoft, I've found that I need to do some additional definitions in Stm32can.cpp. I have a question regarding to this line:
There is a formula where I can find how to calculate CAN Clock? |
@balazsracz can you comment on the above? I'm not very familiar with STM32 unfortunatly. |
Maybe I can get more information about CAN_CLOCK, where is used in the openMRN. I couldn't find it in the sources, only in that file. |
Success to compile it on F446RE, after adding the necessary code to the openMRN:
|
Please submit the PR to https://github.com/bakerstu/openmrn |
Going purely from memory, (I think I was a the one that wrote the first iteration of the STM32 CAN driver), I believe the CAN peripheral clock frequency had a fixed divider based off of the main system clock on the devices we started with. This may or may not be true for other STM32 devices.
… On Jul 20, 2020, at 1:13 PM, Mike Dunston ***@***.***> wrote:
@balazsracz <https://github.com/balazsracz> can you comment on the above? I'm not very familiar with STM32 unfortunatly.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#3 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AARMLDQYJAHZGXVJ5JPCUN3R4SCMZANCNFSM4LEHAV5Q>.
|
The clock structure of the STM32 microcontrollers exhibits a baroque variety. Sometimes the CAN is on HCLK, sometimes on PCLK, sometimes there are two different PCLKs, and on some microcontrollers the HCLK and PCLK matches and sometimes the PCLK is divided from HCLK by an integer divisor. The divisor is often programmable too. There is a good reason the CAN middleware API asks for this value as an argument :) I would suggest to only look at MCUs that you have an example at hand. Making a guesswork of this is more error prone than worth. Testing becomes important. I don't want you to waste too much time, so if you can't figure out what the right stanza is for the specific MCU that you have, let me know and I'll go look. You will have to test. But I will not go and do exhaustive research to get the values for every single MCU because that's not a good use of time and does not guarantee a good result either. I much rather recommend people to buy one of the few things that I picked as worth supporting (F091 F303 F767 and occasionally the F446). |
Hi,
After fixing #2 manually (until the PR will be pushed to the main source) I've tried to continue to compile the sources.
The source code:
I'm receiving this error:
The pragma messages I've inserted in the OSSelectWakeup.hxx:
And as you can see is actually not selecting any kind of SELECTOR. Going deeper in the code source I've notice those in openmrn_feature.h:
I've noticed that there is no definition for FreeRTOS in "STM32duino FreeRTOS" or in Arduino RTOS.
Second think I can't find any kind in the combination to match the selectors for OPENMRN. That's why, in my opinion, I can't compile at all on STM32.
Kind regards,
Adrian
The text was updated successfully, but these errors were encountered: