cancel
Showing results for 
Search instead for 
Did you mean: 

Truestudio programm with ST Mesh ?

FChou
Associate II

Hi,

I want to ask if i can use truestudio programm to work with ST Mesh BlueNRG1 or BlueNRG2 ?

Thanks.

BG

5 REPLIES 5
alok
Senior

Hello,

You can use Keil tool for ST Mesh for both BlueNRG-1 and BlueNRG-2. The license is free for both the devices with no limitations. ( http://www2.keil.com/stmicroelectronics-stm32/mdk )

You can use TrueStudio as well and you need to create the project yourself. There is no ready project available in the web package.

No, we can't use TrueStudio. It can't properly link the mesh lib with the rest of the code. I think the library ST provides is not GCC compatible and hence the GCC linker crashes. It's great we can have Keil for free but I already have multiple STM32 projects in TrueSTUDIO and constantly switching between two environments is not very comfortable. Please provide GCC lib as well.

Here is minimal code which shows the problem:

#include "bluenrg_mesh.h"
 
int main(void) {
	BluenrgMesh_Process();
}
 
void SystemInit(void) { }

The result is linker (ld.exe) crash:

23:34:00 **** Rebuild of configuration Debug for project mesh ****
Info: Internal Builder is used for build
arm-atollic-eabi-gcc -c ..\main.c -mthumb -mcpu=cortex-m0 -std=gnu11 -O0 -g -fstack-usage -Wall -specs=nano.specs -o main.o 
arm-atollic-eabi-gcc -c -mthumb -mcpu=cortex-m0 -g -Wa,--warn -x assembler-with-cpp -specs=nano.specs -o startup_stm32f030xc.o ..\startup_stm32f030xc.S 
arm-atollic-eabi-gcc -o mesh.elf main.o startup_stm32f030xc.o -lBlueNRG_Mesh_CM0 -mthumb -mcpu=cortex-m0 -T../Debug_STM32F030CC_FLASH.ld -specs=nosys.specs -static -LC:\Users\Grzegorz\Atollic\TrueSTUDIO\STM32_workspace_9.2\mesh -Wl,-cref,-u,Reset_Handler -Wl,-Map=mesh.map -Wl,--defsym=malloc_getpagesize_P=0x80 -Wl,--start-group -lc -lm -Wl,--end-group -specs=nano.specs 
collect2.exe: error: ld returned 5 exit status
 
23:34:17 Build Finished (took 17s.31ms)

alok
Senior

Hello grzegorz,

The original question from Fahad is for BlueNRG1- and -2. While for you it is for STM32F0 in the other thread

So, I don't see the reason why TrueSTUDIO cannot be used for BlueNRG1- and -2

BTW, i suggest to use Keil or IAR which are default projects for the Mesh for BlueNRG-1 and -2

The TrueSTUDIO's linker crashing is not related to STM32F0. It can be BlueNRG-1, BlueNRG-2 or any other CM0 chip. It doesn't matter. The problem is in the library. Fortunately it can be easily fixed by stripping debug symbols:

arm-none-eabi-objcopy --strip-debug libBlueNRG_Mesh_CM0.a

Then there is no problem with linking in TrueSTUDIO.

I know ST doesn't have to support all development environments but as it has bought TrueSTUDIO I thought the support would be better.

We will move projects to TrueSTUDIO eventually. It will be done in planned and phased manner