Cannot get basic examples working on Asset Tracker board with STM32WB5MMG processor

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

Do you see the MicroMod STM32WB5MMG processor in the Tools menu, as in the attached screenshot?

Arduino_Tools_menu.png

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

dboddie:
Do you see the MicroMod STM32WB5MMG processor in the Tools menu, as in the attached screenshot?

Arduino_Tools_menu.png

Thanks for the reply. Yes, I have that board selected in the tools menu.

TS-Russell:
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

Screenshot 2023-11-01 072614.png

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

ohmslaw:
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.

TS-Russell:
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

I also tried to build the asset tracker blink example for the STM32WB5MMG processor and it failed with the same errors.

Something is failing to include the definitions for the pins, and I couldn’t immediately see where those definitions should be included from.

Thanks for the confirmation dboddie.

Hopefully I can get a further response from the Sparkfun Technical Gurus.

Cheers,

David

To the Sparkfun Techincal Gurus:

Can I please get a further response - other than ‘follow the tutorials’ which I have done thoroughly and do not work?

It seems another user has had exactly the same issue.

Thanks,

David

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…

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.](Arduino_Core_STM32/variants/STM32F4xx/F405RGT_F415RGT/variant_MICROMOD_F405.h at main · stm32duino/Arduino_Core_STM32 · GitHub)](Arduino_Core_STM32/variants/STM32WBxx/WB5MMGH/variant_SFE_MMPB_STM32WB5MMG.h at main · stm32duino/Arduino_Core_STM32 · GitHub)](Arduino_Core_STM32/variants/STM32WBxx/WB5MMGH at main · stm32duino/Arduino_Core_STM32 · GitHub)](Arduino_Core_STM32/tools/platformio/boards_remap.json at main · stm32duino/Arduino_Core_STM32 · GitHub)

Thanks for your investigations dboddie - much appreciated! It seems like there may be some work to be done by Sparkfun.

Sparkfun techs - will this happen?

Thanks

David

Awesome work - the easiest way to get it fixed/be notified would be to create an issue here https://github.com/sparkfun/MicroMod_Pr … MMG/issues and engineering will be alerted of the issue

Thanks for you help dboddie. I have raised a defect here: https://github.com/sparkfun/MicroMod_Pr … G/issues/1