-
-
Notifications
You must be signed in to change notification settings - Fork 261
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
Won't compile for ClearCore Arduino #450
Comments
What ever source you are using, it doesn't match the current code, the line numbers in the errors don't match up. From what I can read, it is falling through the various ARM implementation into the "other" which is assumed to be a Duo board; which yours is not. Often this can happen for one of two reasons;
|
I checked the verbose compilation option and got the compiler arguments below. I believe the symbol you mention gets set to "ARDUINO_ARCH_SAM". Sorry for the wall of text that follows. Please let me know if I can somehow edit this to make it more palatable...
|
Yeah, they tried to have a something defined but picked something so generic it is pretty useless. ARM means almost nothing if all the ARMs don't expose a consistent HAL layer (and they don't). So the key defines are ARDUINO_ARCH_SAM and SAME53N19A with the latter being more important. This chip is not supported in NeoPixelBus. I wish SAM meant something common, like a consistent HAL layer that I could work on top of; but as it stands every chip has to have custom code to just provide a bitbang implementation let alone a proper hardware supported solution. So it is very unlikely I would provide the support without an incentive from the company. Feel free to look at the implementations that are present and see if they can work for you with changes. The Nrf52x chips are also ARM and I support the PWM hardware for them as it nice easy interface to use but I thinks it is specific to that chipset. NeoPixelBus\src\internal\NeoNrf52xMethod.h for the hardware PWM support. |
I understand perfectly well why you can't support every oddball chipset out there and thank you for looking into this. I tried Adafruit's library as you suggested and while the code does compile and run without complaining I don't get any output from the LED pins I've tried or the timing must be off somehow. Thanks again, |
I scanned Adafruits library; the "Adafriut_NeoPixel" library as we have some common code. I am not sure why you are not getting an error output when it compiles; as NONE of the symbols provided above are in their sets (arm or not). Which should fall through to output the following compile error
If you can figure out what code of theirs is building into what ever sample you are using; then I might be able to look at "turning on" the same in my library. |
I added a bunch of #warning statements in Adafruit's NeoPixel library to see which parts were getting compiled and it seems it is only the global arm portion of NeoPixel.cpp that is getting accessed. None of the more specific areas are reached at compile time like NRF52_SERIES, SAMD21E17A, SAMD21E18A etc... I know the ClearCore platform has a few deviations from the standard Arduino behavior. I'll review what the arm area of Adafruit's library does exactly and post back if useful to you. |
Please give this little sketch a try and tell me what you see in the debug output. This might lead to a general ARM bitbang that is more accurate than the current implementations.
|
Here you go: `C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\thorswill\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\thorswill\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\thorswill\Documents\Arduino\libraries -fqbn=ClearCore:sam:clearcore -vid-pid=0000_0000 -ide-version=10813 -build-path C:\Users\THORSW "C:\Users\thorswill\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-size" -A "C:\Users\THORSW~1\AppData\Local\Temp\arduino_build_971089/sketch_mar23a.ino.elf" |
I mean, upload and capture the serial output ;-) |
Doh! Not sure how many iteration you need but here are a few... 19:55:47.233 -> 1073741825 |
Well that is interesting. The ESP32 Bitbang method could be modified to provide a reasonable version for many ARM processors that support this special cycle counter. A lot of them don't (M0s for example) but at least in this case yours does; otherwise the numbers would have been zero like it does on the only ARM I own (a M0). Stay tuned. |
Something more to try quickly. Take a NeoPixelBus sample (or your favorite sketch using NeoPixelBus). At the top where you include NeoPixelBus, make sure it looks like this ....
And see if that works. |
So using your NeoPixelTest.ino sketch modified as so:
...the rest of the sketch was left as is I get the following when compiling:
|
Thanks, just more proof of the fragmentation of ARM implementations for Arduino. You will have to wait for my new ARM bitbang method I am working on. |
Ok, I just published a new branch here that contains the general purpose ARM bit bang methods. It is currently only enabled for your specific board setup. So, fetch this branch to your machine (you can put it directly over the installed version in the documents\arduino\libraries\NeoPixelBus* ) and give it a try. I would suggest starting with the |
I can see NeoArmBitBangMethod.cpp but not NeoArmBitBangWs2812xMethod.cpp. Is that the one you meant? Unfortunately they both generate a |
The "method" is the second part of the NeoPixelBus template construction. Instead of Neo800KbpsMethod use NeoArmBitBangWs2812xMethod like...
No need for any special defines or includes (so remove ones I have asked you to try). If this gives you a build error, then more than likely you did not clone the branch into the correct location. The file that is new is "NeoArmBitBangMethod.h"; which will be in "C:\Users<your user name>\Documents\Arduino\libraries\NeoPixelBus\src\internal" |
Yes, this was my understanding as well. I copied the ArmBitBang branch over the existing C:\Users\Documents\Arduino\libraries\NeoPixelBus by Makuna\ and restarted the IDE in case that was required to take the changed files into account. I also verified the time stamps in the src\internal directory and the files were indeed overwritten. I can see the NeoArmBitBangMethod.h file in there but the compiler apparently doesn't... I erase the complete folder instead of simply overwriting it and post back. My current code is as follows:
|
So I started anew with the same result unfortunately... Here goes: C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\thorswill\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\thorswill\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\thorswill\Documents\Arduino\libraries -fqbn=ClearCore:sam:clearcore -vid-pid=2890_8022 -ide-version=10813 -build-path C:\Users\THORSW |
Please try to minimize the amount of copied compile output. Only need the errors at the end and one line above them that includes the -DARDUINO_ARH_ARM part. Look at your example, are you using the
This is what I asked you to use
Do you see the difference? |
Hi, Yes, I first tried with NeoArmBitBangWs2812xMethod and since the compiler reported it as undeclared I then tried NeoArmBitBangMethod with the same result. I will gladly reduce the amount of clutter in any subsequent posts. |
I made a small change, maybe it will help clarify any build issues. At the top of your sketch, before you include NeoPixelBus.h, add
This will require that you grab the latest version of custom branch (https://github.com/Makuna/NeoPixelBus/tree/ArmBitBang) I would suggest you remove your current NeoPixelBus library from the library manager and make sure its gone in Arduino\libraries\ folder. Then re-clone/download this ArmBitBang branch into your library folder. |
Sorry for the delayed response. Completely removed library and copied latest ArmBitBang branch. Same result unfortunately. NeoArmBitBangWs2812xMethod still undeclared (see errors below). I then tried deleting the ArmBitBang library folder before recompiling just to make sure there weren't some nested leftover copies somewhere interfering and I immediately got a missing NeoPixelBus.h error which seems to indicate it was indeed using the right library folder and that there weren't any others interfering.
Installing the Clearcore wrapper from your end might prove simpler to debug. Even though you don't have the hardware you could still see if it compiles or not. Once you've got it compiling on your end I can validate if it works on the hardware. Thanks for your patience! |
If Clearcore team wants to support Arduino correctly (with a board manager install) I would give it try. I am over the "install Arduino support from our site only" crap; as almost all of them have some sort of install/build problems or even standard Arduino support problems; let alone a poor path to upgrading the versions. I just switched from ARDUINO_ARCH_ARM to ARDUINO_ARCH_SAM; for now. The ARDUINO_ARCH_SAM is specific to your build environment, all mine use ARDUINO_ARCH_ARM. |
Hi,
Trying to compile the NeoPixelTest example for this particular board based on an ARM M4F, SAME53N19A chip and getting a bunch of missing declarations. Any hope of getting this to compile on this neat industrial Arduino variant?
Arduino: 1.8.13 (Windows 10), Board: "Teknic ClearCore"
In file included from ...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/NeoPixelBus.h:114:0,
from ...\AppData\Local\Temp\arduino_modified_sketch_86674\NeoPixelTest.ino:15:
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h: In static member function 'static void NeoArmOtherSpeedBase<T_SPEEDPROPS>::send_pixels(uint8_t*, size_t, uint8_t)':
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:725:9: error: 'Pio' was not declared in this scope
Pio* port;
^~~
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:725:14: error: 'port' was not declared in this scope
Pio* port;
^~~~
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:725:14: note: suggested alternative: 'Port'
Pio* port;
^~~~
Port
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:735:9: error: there are no arguments to 'pmc_set_writeprotect' that depend on a template parameter, so a declaration of 'pmc_set_writeprotect' must be available [-fpermissive]
pmc_set_writeprotect(false);
^~~~~~~~~~~~~~~~~~~~
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:735:9: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:736:9: error: there are no arguments to 'pmc_enable_periph_clk' that depend on a template parameter, so a declaration of 'pmc_enable_periph_clk' must be available [-fpermissive]
pmc_enable_periph_clk((uint32_t)TC3_IRQn);
^~~~~~~~~~~~~~~~~~~~~
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:739:13: error: 'TC_CMR_WAVE' was not declared in this scope
TC_CMR_WAVE | TC_CMR_WAVSEL_UP | TC_CMR_TCCLKS_TIMER_CLOCK1);
^~~~~~~~~~~
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:739:13: note: suggested alternative: 'REG_TCC1_WAVE'
TC_CMR_WAVE | TC_CMR_WAVSEL_UP | TC_CMR_TCCLKS_TIMER_CLOCK1);
^~~~~~~~~~~
REG_TCC1_WAVE
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:739:27: error: 'TC_CMR_WAVSEL_UP' was not declared in this scope
TC_CMR_WAVE | TC_CMR_WAVSEL_UP | TC_CMR_TCCLKS_TIMER_CLOCK1);
^~~~~~~~~~~~~~~~
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:739:27: note: suggested alternative: 'TC_CTRLBSET_LUPD'
TC_CMR_WAVE | TC_CMR_WAVSEL_UP | TC_CMR_TCCLKS_TIMER_CLOCK1);
^~~~~~~~~~~~~~~~
TC_CTRLBSET_LUPD
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:739:46: error: 'TC_CMR_TCCLKS_TIMER_CLOCK1' was not declared in this scope
TC_CMR_WAVE | TC_CMR_WAVSEL_UP | TC_CMR_TCCLKS_TIMER_CLOCK1);
^~~~~~~~~~~~~~~~~~~~~~~~~~
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:738:9: error: there are no arguments to 'TC_Configure' that depend on a template parameter, so a declaration of 'TC_Configure' must be available [-fpermissive]
TC_Configure(TC1, 0,
^~~~~~~~~~~~
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:740:9: error: there are no arguments to 'TC_Start' that depend on a template parameter, so a declaration of 'TC_Start' must be available [-fpermissive]
TC_Start(TC1, 0);
^~~~~~~~
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:742:19: error: 'g_APinDescription' was not declared in this scope
pinMask = g_APinDescription[pin].ulPin; // Don't 'optimize' these into
^~~~~~~~~~~~~~~~~
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:742:19: note: suggested alternative: 'IcmDescriptor'
pinMask = g_APinDescription[pin].ulPin; // Don't 'optimize' these into
^~~~~~~~~~~~~~~~~
IcmDescriptor
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:746:28: error: 'union Tc' has no member named 'TC_CHANNEL'
timeValue = &(TC1->TC_CHANNEL[0].TC_CV); // the initial 'while'.
^~~~~~~~~~
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:747:28: error: 'union Tc' has no member named 'TC_CHANNEL'
timeReset = &(TC1->TC_CHANNEL[0].TC_CCR);
^~~~~~~~~~
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:768:26: error: 'TC_CCR_CLKEN' was not declared in this scope
*timeReset = TC_CCR_CLKEN | TC_CCR_SWTRG;
^~~~~~~~~~~~
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:768:26: note: suggested alternative: 'TC_CTRLA_COPEN'
*timeReset = TC_CCR_CLKEN | TC_CCR_SWTRG;
^~~~~~~~~~~~
TC_CTRLA_COPEN
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:768:41: error: 'TC_CCR_SWTRG' was not declared in this scope
*timeReset = TC_CCR_CLKEN | TC_CCR_SWTRG;
^~~~~~~~~~~~
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:768:41: note: suggested alternative: 'TCC1_SWAP'
timeReset = TC_CCR_CLKEN | TC_CCR_SWTRG;
^~~~~~~~~~~~
TCC1_SWAP
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:788:9: error: there are no arguments to 'TC_Stop' that depend on a template parameter, so a declaration of 'TC_Stop' must be available [-fpermissive]
TC_Stop(TC1, 0);
^~~~~~~
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h: In instantiation of 'static void NeoArmOtherSpeedBase<T_SPEEDPROPS>::send_pixels(uint8_t, size_t, uint8_t) [with T_SPEEDPROPS = NeoArmOtherSpeedPropsWs2812x; uint8_t = unsigned char; size_t = unsigned int]':
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:84:29: required from 'void NeoArmMethodBase<T_SPEED>::Update(bool) [with T_SPEED = NeoArmOtherSpeedBase]'
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/NeoPixelBus.h:189:9: required from 'void NeoPixelBus<T_COLOR_FEATURE, T_METHOD>::Show(bool) [with T_COLOR_FEATURE = NeoGrbFeature; T_METHOD = NeoArmMethodBase<NeoArmOtherSpeedBase >]'
...\AppData\Local\Temp\arduino_modified_sketch_86674\NeoPixelTest.ino:77:16: required from here
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:735:29: error: 'pmc_set_writeprotect' was not declared in this scope
pmc_set_writeprotect(false);
~~~~~~~~~~~~~~~~~~~~^~~~~~~
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:736:30: error: 'pmc_enable_periph_clk' was not declared in this scope
pmc_enable_periph_clk((uint32_t)TC3_IRQn);
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:739:72: error: 'TC_Configure' was not declared in this scope
TC_CMR_WAVE | TC_CMR_WAVSEL_UP | TC_CMR_TCCLKS_TIMER_CLOCK1);
^
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:740:17: error: 'TC_Start' was not declared in this scope
TC_Start(TC1, 0);
~~~~~~~~^~~~~~~~
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:740:17: note: suggested alternative: 'dhcp_start'
TC_Start(TC1, 0);
~~~~~~~~^~~~~~~~
dhcp_start
...\Documents\Arduino\libraries\NeoPixelBus_by_Makuna\src/internal/NeoArmMethod.h:788:16: error: 'TC_Stop' was not declared in this scope
TC_Stop(TC1, 0);
~~~~~~~^~~~~~~~
exit status 1
Error compiling for board Teknic ClearCore.
The text was updated successfully, but these errors were encountered: