cancel
Showing results for 
Search instead for 
Did you mean: 

TrueSTUDIO for STM32 9.0.0 with BlueNRG-1?

Wolfgang Reinig
Associate II

Posted on February 12, 2018 at 12:33

Hi,

I got my STEVAL-IDB007V1M with the SPBTLE-1' (based on BlueNRG-1 and installed the STSW-BLUENRG1-DK (v2.6.0). With the help of Antonio (

https://community.st.com/0D50X00009XkWquSAF

) I know, the STEVAL-IDB007V1M works as it should.

I installed Atollic TrueSTUDIO for STM32 9.0.0, I imported the BLE_SensorDemo project as described in 'SensorDemo_BlueMS_main.c File Reference'. I can build the project - when I flash the Release.hex file to the BlueNRG-1 with the 'BlueNRG-1 Flasher' nothing happens on the BlueNRG-1.

Same with Micro_Hello_World :(

What's wrong?

I set the HS_SPEED_XTAL=HS_SPEED_XTAL_32MHZ in BLE_SensorDemo and I already switched the optimization level to -O0 in the compiler settings of the projects.

TIA, best regards

Wolfgang

6 REPLIES 6
Lukasz Iwaszkiewicz
Associate III
Posted on February 18, 2018 at 23:17

Hi all

   I have the same problem as Wolfgang. I compiled BLE_Beacon example with newest TrueStudio under Windows 7, under Linux, and I even used my own toolchain, all 3 with no luck whatsoever. I Flashed the binary both using the flasher application provided by ST, and using ST-link via SWD interface. The program crashes with the following stacktrace:

1 HardFault_Handler         BlueNRG1_it.c     68  0x10040ac8

2 ??                                              0xfffffff9

3 IDD_Initialize_Device_IDs                       0x10054df0

4 GAP_Init                                        0x10043a7c

5 aci_gap_init                                    0x100434ce

6 Device_Init               BLE_Beacon_main.c 75  0x100408e2

7 main                      BLE_Beacon_main.c 210 0x10040a66

But since BLE stack is provided only in binary, I am unable to investigate what's happening inside.

At the same time I was able to successfully run the GPIO/IOToggle example, but as you might expect it does not use the BLE stack. Later on I checked all the BLE examples, and none of them (I mean when compiled with TrueStudio by me) worked.

At this point I suspect some misconfiguration in the projects (?) Also, it would be wise to check non-GCC compilers as well, but I have no experience with them. BTW does anybody know what compiler ST uses for the examples bundled in the SW package (I mean those in the 'firmware' directory)?
Lukasz Iwaszkiewicz
Associate III
Posted on February 19, 2018 at 15:43

I managed to finally run BLE_Beacon but unfortunately I compiled it with my own cross compiler (GCC based). The stacktrace and the error I posted above was due to me using BlueNRG2.ld instead of BlueNRG1.ld during linking. Apparently those 'device_ids' are stored at the very end of flash memory, which in case of BlueNRG2 is slightly bigger. Thus my NRG1 was trying to write onto nonexistent flash. I still don't know why projects compiled with TrueStudio don't work though, and I would love to know this.

Lukasz Iwaszkiewicz
Associate III
Posted on February 21, 2018 at 15:29

Hi once again. Piotr Romaniuk, who is also active on this forum suggested that you should add 

-mcpu=cortex-m0 to compilation options.

Posted on May 11, 2018 at 19:31

Indeed!!!

I spent couple of hours until I found that ISR code contains non Thumb instructions.

After specification of sub-architecture compiled code is ok.

Regards,

Piotr Romaniuk
Robert Scholz
Associate II
Posted on June 20, 2018 at 16:06

Hi,

I have same problem. I can not build a running bin/hex for STEVAL-IDB007V1M with TrueStudio 9.01.

Is there a solution?

I tried with IAR -> no problem, but I'm looking for a cheap solution :)

Thanks!

Robert

Posted on June 20, 2018 at 18:29

Hi Robert,

please read the thread:

https://community.st.com/0D50X00009Xkht6SAB

Regards,

Piotr Romaniuk