cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with SBSFU_STM32L496G-Discovery_Cloud_AWS_V1.4.0.bin (P-L496G-CELL02)

KYu.1
Associate II

Hi 

I am going to use the binary file (SBSFU_STM32L496G-Discovery_Cloud_AWS_V1.4.0.bin) on development kit P-L496G-CELL02 to connect AWS server. However, the boot up prompt message does not include the configuration of external SIM card and VPN entry, so I cannot take the next step to do AWS root certificate update. Please let us know how to config the BG96 modem.Thanks !

Beside, I cannot find project file (.ioc) in STM32CubeExpansion_Cloud_AWS_V1.4 2 folder. It only has (.uvprojx) and (.eww) project files but I don’t have IAR or KEIL compliers to open it. Can I know whether it has any project file that can be opened by STM32cubeMX ?

Regards,

Kelvin.

.

= [SBOOT] System Security Check successfully passed. Starting...

= [FWIMG] Slot #0 @: 8080800 / Slot #1 @: 8014000 / Swap @: 80ec800

======================================================================

=       (C) COPYRIGHT 2017 STMicroelectronics        =

=                                  =

=       Secure Boot and Secure Firmware Update        =

======================================================================

= [SBOOT] SECURE ENGINE INITIALIZATION SUCCESSFUL

= [SBOOT] STATE: CHECK STATUS ON RESET

. INFO: A Reboot has been triggered by a Hardware reset!

. Consecutive Boot on error counter = 0 

. INFO: Last execution detected error was:No error. Success.

= [SBOOT] STATE: CHECK NEW FIRMWARE TO DOWNLOAD

= [SBOOT] STATE: CHECK USER FW STATUS

. A valid FW is installed in the active slot - version: 1

= [SBOOT] STATE: VERIFY USER FW SIGNATURE

= [SBOOT] STATE: EXECUTE USER FIRMWARE

 Starting Main Thread...

*************************************************************

*** STM32 IoT Discovery kit for             

***   STM32F413/STM32F769/STM32L475/STM32L496 MCU   

*** X-CUBE-AWS Cloud Connectivity Demonstration         

*** FW version 1.4.0 - 07-June-2019 04:09:58 PM   

*************************************************************

*** Board personalization ***

- Network Interface initialized: 

- Network Interface starting: 

*** C2C connection ***

Initializing the cellular module

- Network Interface connecting: 

Trying to connect with the external SIM

Waiting for BG96 modem running

Signal not known or not detectable yet (be patient)

......................

Signal Level: -79 dBm 

...........

C2C module registered

Registration done in 30024 msseconds

Retrieving the cellular operator: "3 (2G)"

Module initialized successfully: Quectel

ProductID: BG96

FW version: BG96MAR02A07M1G

SIM Id (IccID): 8985203104047687826F

- Network Interface started: 

  - Device Name : Quectel. 

  - Device ID : BG96. 

  - Device Version : BG96MAR02A07M1G. 

Download path:

https://my.st.com/content/my_st_com/en/products/embedded-software/mcu-mpu-embedded-software/stm32-embedded-software/stm32cube-expansion-packages/x-cube-aws.license=1591393191860.product=X-CUBE-AWS.version=1.4.0.html

4 REPLIES 4
Guillaume K
ST Employee

In X-CUBE-AWS version 1.4.0 you have to change the mobile configuration in the sources:

STM32CubeExpansion_Cloud_AWS_V1.4.0\Projects\32L496GDISCOVERY\Applications\Cloud\AWS\Src\set_credentials.c

line 29:

const net_cellular_credentials_t Credentials =

 {

   "EM",

   "",

   "",

   false,

 };

replace "EM" by the name of your mobile network APN.

if needed, put user name and password in second and third parameter

If using an external SIM, keep false in fourth parameter.

Then you have to recompile the application;

The package contains project files for IAR EWARM, Keil DMK-ARM and System Workbench for STM32 :

Projects\32L496GDISCOVERY\Applications\Cloud\AWS\EWARM

Projects\32L496GDISCOVERY\Applications\Cloud\AWS\MDK-ARM

Projects\32L496GDISCOVERY\Applications\Cloud\AWS\SW4STM32

If you chose to use STM32CubeIDE it may be possible to import the SW4STM32 project files:

In STM32CubeIDE, select a directory for a workspace (for example Projects\32L496GDISCOVERY\Applications\Cloud\AWS), click Launch, then chose "Import SW4STM32 or TrueSTUDIO project" .

(If a workspace is already open, use menu File / Import ; General / Import ac6 System Workbench for STM32 Project)

Select the SW4STM32 directory. Import only the SW4STM32\STM32L496G-Discovery_AWS directory.

Then in Project Explorer right-click on STM32L496G-Discovery_AWS project and select Build Project.

The binary to be flashed is Projects\32L496GDISCOVERY\Applications\Cloud\AWS\SW4STM32\PostBuild\SBSFU_STM32L496G-Discovery_AWS.bin

Many thanks for your reply!

I used STM32CubeIDE and imported the SW4STM32 project files from  Projects\32L496GDISCOVERY\Applications\Cloud\AWS.

An error was found when I made a right-click  on STM32L496G-Discovery_AWS project and build the project.

Seems that it cannot find the file on BootLoader_OSC/2_Images_SECoreBin/SW4STM32/postbuild.sh: line 93

I extracted the files on C:/PC/Download/en.x-cube-aws/

Please let me know if there are any mistakes. Thanks !

Regards,

Kelvin

00:31:55 **** Incremental Build of configuration Debug for project STM32L496G-Discovery_AWS ****

make all 

rm -rf STM32L496G-Discovery_AWS.elf

arm-none-eabi-gcc -z max-page-size=0x200 -o "STM32L496G-Discovery_AWS.elf" @"objects.list" -l:se_interface_app.o -mcpu=cortex-m4 -T"../STM32L496AGIx_FLASH.ld" --specs=nosys.specs -Wl,-Map="STM32L496G-Discovery_AWS.map" -Wl,--gc-sections -static -L../../../../../BootLoader_OSC/2_Images_SBSFU/SW4STM32/STM32L496G-Discovery_2_Images_SBSFU/Debug -Xlinker -L../../../../../BootLoader_OSC/Linker_Common/SW4STM32 --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -u _printf_float -Wl,--start-group -lc -lm -Wl,--end-group

Finished building target: STM32L496G-Discovery_AWS.elf

arm-none-eabi-size  STM32L496G-Discovery_AWS.elf 

  text   data   bss   dec   hex filename

 245760   1216 217264 464240  71570 STM32L496G-Discovery_AWS.elf

Finished building: default.size.stdout

arm-none-eabi-objdump -h -S STM32L496G-Discovery_AWS.elf > "STM32L496G-Discovery_AWS.list"

Finished building: STM32L496G-Discovery_AWS.list

arm-none-eabi-objcopy -O binary STM32L496G-Discovery_AWS.elf "STM32L496G-Discovery_AWS.bin"

Finished building: STM32L496G-Discovery_AWS.bin

arm-none-eabi-objcopy -O binary "STM32L496G-Discovery_AWS.elf" "STM32L496G-Discovery_AWS.bin"

arm-none-eabi-size "STM32L496G-Discovery_AWS.elf"

  text   data   bss   dec   hex filename

 245760   1216 217264 464240  71570 STM32L496G-Discovery_AWS.elf

"../../../../../BootLoader_OSC/2_Images_SECoreBin/SW4STM32/postbuild.sh" "../.." "./STM32L496G-Discovery_AWS.elf" "./STM32L496G-Discovery_AWS.bin" "1" bigelf

prepareimage with windows executeable

Generating the global elf file SBSFU and userApp

../../../../../BootLoader_OSC/2_Images_SECoreBin/SW4STM32/postbuild.sh: line 93: STM32_Programmer_CLI.exe: not found

STM32_Programmer_CLI.exe -ms ./STM32L496G-Discovery_AWS.elf ../../PostBuild/STM32L496G-Discovery_AWSsfuh.bin C:/kelvinyu/en.x-cube-aws/STM32CubeExpansion_Cloud_AWS_V1.4.0/Projects/32L496GDISCOVERY/Applications/BootLoader_OSC/2_Images_SBSFU/SW4STM32/STM32L496G-Discovery_2_Images_SBSFU/Debug/SBSFU.elf : failed

make[1]: *** [makefile:108: post-build] Error 1

make: *** [makefile:70: all] Error 2

"make all" terminated with exit code 2. Build might be incomplete.

00:32:54 Build Failed. 2 errors, 0 warnings. (took 59s.466ms)

Guillaume K
ST Employee

The SBSFU bootloader post-build process requires STM32 Cube Programmer tool to merge SBSFU and the AWS application in a single .bin file.

Do you have Cube Programmer installed ?

The executable STM32_Programmer_CLI must be in the PATH, or change postbuild.sh to point to its exact location. STM32_Programmer_CLI is under bin/ folder in Cube Programmer directory.

Hi Guillaume,

I successfully build SBSFU_STM32L496G-Discovery_AWS.bin after installed Cube Programmer. Thanks !

Regards,

Kelvin