SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions about carrier boards have here!
#244939
New to all this. Trying to get AssetTracker_Example1_Blink going but can't even compile (see errors below). I have tried using the 'Generic STM32WB series board as well as 'Sparkfun Boards' with the same result.

Edit: have also selected 'Generic WB5MMGHx' as the 'Board Part number' in the Arduino IDE - this is the closest one in the list.

Does anyone have any suggestions? Thanks!

Am getting the following error:

In file included from D:\code\Asset_Tracker\MicroMod_Asset_Tracker-main\Examples\AssetTracker_Example1_Blink\AssetTracker_Example1_Blink.ino:39:
D:\code\Asset_Tracker\MicroMod_Asset_Tracker-main\Examples\AssetTracker_Example1_Blink\AssetTrackerPins.h:90:24: error: 'RX1' was not declared in this scope
90 | HardwareSerial Serial1(RX1, TX1);
| ^~~
D:\code\Asset_Tracker\MicroMod_Asset_Tracker-main\Examples\AssetTracker_Example1_Blink\AssetTrackerPins.h:90:29: error: 'TX1' was not declared in this scope
90 | HardwareSerial Serial1(RX1, TX1);
| ^~~
D:\code\Asset_Tracker\MicroMod_Asset_Tracker-main\Examples\AssetTracker_Example1_Blink\AssetTrackerPins.h:105:28: error: 'G0' was not declared in this scope; did you mean 'y0'?
105 | const int MICROSD_CS = G0; // Output: Active low
| ^~
| y0
D:\code\Asset_Tracker\MicroMod_Asset_Tracker-main\Examples\AssetTracker_Example1_Blink\AssetTrackerPins.h:106:28: error: 'G1' was not declared in this scope; did you mean 'y1'?
106 | const int MICROSD_PWR_EN = G1; // Output: Pull low to enable power for the SD card. Pull high to disable.
| ^~
| y1
D:\code\Asset_Tracker\MicroMod_Asset_Tracker-main\Examples\AssetTracker_Example1_Blink\AssetTrackerPins.h:107:28: error: 'G2' was not declared in this scope; did you mean 'D2'?
107 | const int SARA_PWR = G2; // Output: Pull high then low to switch the SARA-R5 on. Pull high for five seconds then low again to switch it off.
| ^~
| D2
D:\code\Asset_Tracker\MicroMod_Asset_Tracker-main\Examples\AssetTracker_Example1_Blink\AssetTrackerPins.h:108:28: error: 'G3' was not declared in this scope; did you mean 'D3'?
108 | const int IMU_PWR_EN = G3; // Output: Pull high to enable power for the IMU. Pull low to disable.
| ^~
| D3
D:\code\Asset_Tracker\MicroMod_Asset_Tracker-main\Examples\AssetTracker_Example1_Blink\AssetTrackerPins.h:109:28: error: 'G4' was not declared in this scope; did you mean 'D4'?
109 | const int SARA_RI = G4; // Input: SARA-R5 Ring Indicator pin. Becomes CTS2 in 2-UART mode.
| ^~
| D4
D:\code\Asset_Tracker\MicroMod_Asset_Tracker-main\Examples\AssetTracker_Example1_Blink\AssetTrackerPins.h:110:28: error: 'G5' was not declared in this scope; did you mean 'D5'?
110 | const int SARA_INT = G5; // Input: SARA-R5 EXT_INT interrupt pin.
| ^~
| D5
D:\code\Asset_Tracker\MicroMod_Asset_Tracker-main\Examples\AssetTracker_Example1_Blink\AssetTrackerPins.h:111:28: error: 'G6' was not declared in this scope; did you mean 'D6'?
111 | const int SARA_ON = G6; // Input: Pulled low when the SARA-R5 is on. Pulled high when the SARA-R5 is off.
| ^~
| D6
D:\code\Asset_Tracker\MicroMod_Asset_Tracker-main\Examples\AssetTracker_Example1_Blink\AssetTrackerPins.h:87:16: error: 'INT' was not declared in this scope; did you mean 'IN'?
87 | #define I2CINT INT
| ^~~
D:\code\Asset_Tracker\MicroMod_Asset_Tracker-main\Examples\AssetTracker_Example1_Blink\AssetTrackerPins.h:121:21: note: in expansion of macro 'I2CINT'
121 | const int IMU_INT = I2CINT; // Input: IMU interrupt pin
| ^~~~~~

exit status 1

Compilation error: 'RX1' was not declared in this scope
#244957
TS-Russell wrote: Tue Oct 31, 2023 12:33 pm Try loading the board package here https://learn.sparkfun.com/tutorials/mi ... ware-setup and then picking up in the Asset Tracker's guide here https://learn.sparkfun.com/tutorials/mi ... ware-setup
Thanks for the reply. I believe I have followed everything exactly as described in these tutorials. I have uploaded a screenshot of the Tools menu selection. Is there anything in there that you can see is wrong?

Edit: Have also uploaded a screenshot of the Blink example instructions (which I have followed). It's interesting to note that there is no mention of STM32 boards in this text. Has this got anything to do with it?

Thanks
You do not have the required permissions to view the files attached to this post.
#244961
ohmslaw wrote: Tue Oct 31, 2023 5:09 pm I know you're using a different processor, but this SparkFun guide suggests that the STM32Cube software is needed to use STM32 processors. https://learn.sparkfun.com/tutorials/mi ... rogramming

STM32Cube IDE provides drivers for the STM32 processor. https://www.st.com/en/development-tools ... t-software
Thanks for that. Yep, have already downloaded and installed this. It appears this is used when uploading to the STM32. I am getting these errors in the compiling stage.
#244978
TS-Russell wrote: Tue Oct 31, 2023 12:33 pm Try loading the board package here https://learn.sparkfun.com/tutorials/mi ... ware-setup and then picking up in the Asset Tracker's guide here https://learn.sparkfun.com/tutorials/mi ... ware-setup
Hi TS-Russell, As I have followed the tutorials, is there anything else you can suggest?

Thanks
David
#245141
Just as a test, did you try selecting the STM32F405 processor in the "Board part number" submenu of the "Tools" menu, and compiling with that? Not to actually install on the board, but as a compilation test. That compiled successfully for me, which indicates that there is something lacking in the STM32WB5MMG support that is present in the STM32F405 support.

I'll dig into it a bit more...
#245143
Digging around in the Arduino code, it seems that this MicroMod board is mapped in the boards_remap.json file to the SFE_MMPB_STM32WB5MMG implementation. That can be found in this directory. However, symbols like RX1 are not defined in the relevant header file as they are in the equivalent header file for the STM32F405 board.

So, I think someone needs to look at the schematic for the processor board and make a similar set of definitions to those for the STM32F405.
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum