Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


ST-link printf to console with GDB and semihosting or ITM and ST Link Utility

I followed the above post. But in my system workbench setup i am not able to find out tool_setting->Mcu Gcc compiler option. attaching the screenshot for this.

Can someone please confirm why this option is not present in my setup? Or how can i get this.

Thanks,
Nikhil Sahu

France

Hi,

Looks like you’ve created a “Makefile project”, not an “Executable” or “Static Library” project where SW4STM32 will generate the Makefile from the tool settings; in your case you can’t edit compiler settings, just because the compiler invokation is done by the Makefile that you provide by yourself.

You should then convert the proposed settings to the appropriate C/C++ compiler settings in your Makefile for using ITM or semihosting for printf.

HTH

Bernard (Ac6)

Hi,

I am added the flag in my makefile as
LDFLAGS = -g -Wl,gc-sections,-Map=$*.map,-cref -fno-short-enums -Wl,no-enum-size-warning -T $(LDSCRIPT) $(CPU) -specs=nosys.specs -specs=nano.specs -specs=rdimon.specs -lc -lrdimon

But after this when i am doing the compilation we are facing multiple definition error (but these funtions are not defined anywhere i double checked this) as

arm-none-eabi-gcc -g -Wl,gc-sections,-Map=output/bl-v2/release/main.map,-cref -fno-short-enums -Wl,no-enum-size-warning -T ./STM32L496ZGTx_FLASH.ld -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -specs=nosys.specs -specs=nano.specs -specs=rdimon.specs -lc -lrdimon -o output/bl-v2/release/main.out output/bl-v2/release/startup_stm32l496xx.o output/bl-v2/release/system_stm32l4xx.o output/bl-v2/release/ackbar_main.o output/bl-v2/release/assert.o output/bl-v2/release/board_id.o output/bl-v2/release/console.o output/bl-v2/release/gps.o output/bl-v2/release/ble.o output/bl-v2/release/backlight.o output/bl-v2/release/lte.o output/bl-v2/release/button.o output/bl-v2/release/hallsensor.o output/bl-v2/release/vibsensor.o output/bl-v2/release/accelgyro.o output/bl-v2/release/power.o output/bl-v2/release/lpm.o output/bl-v2/release/is66wve.o output/bl-v2/release/it8951.o output/bl-v2/release/printf.o output/bl-v2/release/extflash.o output/bl-v2/release/sys.o output/bl-v2/release/syscalls.o output/bl-v2/release/tasklet.o output/bl-v2/release/temp.o output/bl-v2/release/mfgdata.o output/bl-v2/release/ymodem.o output/bl-v2/release/bitmap.o output/bl-v2/release/stsafe.o output/bl-v2/release/flash_if.o output/bl-v2/release/adc.o output/bl-v2/release/clock.o output/bl-v2/release/common.o output/bl-v2/release/fifo.o output/bl-v2/release/gpio.o output/bl-v2/release/i2c.o output/bl-v2/release/rtc.o output/bl-v2/release/spi.o output/bl-v2/release/sram.o output/bl-v2/release/stm32l4xx_it.o output/bl-v2/release/timer.o output/bl-v2/release/uart.o output/bl-v2/release/watchdog.o output/bl-v2/release/key_det.o output/bl-v2/release/extflash_mgr.o output/bl-v2/release/security_mgr.o output/bl-v2/release/disp_mgr.o output/bl-v2/release/logging_mgr.o output/bl-v2/release/vehicle_mgr.o output/bl-v2/release/settings_mgr.o output/bl-v2/release/messaging_mgr.o output/bl-v2/release/gps_mgr.o output/bl-v2/release/rtc_mgr.o output/bl-v2/release/sys_events.o output/bl-v2/release/timer_mgr.o output/bl-v2/release/app_main.o output/bl-v2/release/messaging.o output/bl-v2/release/phonehome.o output/bl-v2/release/vehicle_motion.o output/bl-v2/release/plate_attachment.o output/bl-v2/release/fault.o output/bl-v2/release/demo.o output/bl-v2/release/ssl_client.o output/bl-v2/release/http_client.o output/bl-v2/release/campaignZone.pb-c.o output/bl-v2/release/config.pb-c.o output/bl-v2/release/eventEnvelope.pb-c.o output/bl-v2/release/log.o output/bl-v2/release/message.pb-c.o output/bl-v2/release/protobuf-c.o output/bl-v2/release/readWriteEvent.o ./Drivers//STM32L4xx_HAL_Driver/libstm32l4hal.a ./Middlewares//ST/STSAFE_A/libstsafe.a ./Middlewares//Third_Party/FreeRTOS/libfreertos.a ./Middlewares//Third_Party/mbedTLS/mbedtls-2.6.0/library/libmbedtls.a ./Middlewares//Third_Party/mbedTLS/mbedtls-2.6.0/library/libmbedx509.a ./Middlewares//Third_Party/mbedTLS/mbedtls-2.6.0/library/libmbedcrypto.a ./Middlewares//Third_Party/xz/xz.a -lm
output/bl-v2/release/syscalls.o: In function `initialise_monitor_handles’:
D:\work\/src/drivers/syscalls.c:100: multiple definition of `initialise_monitor_handles’
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.17.0.201812190825/tools/compiler/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard\librdimon_nano.a(rdimon-syscalls.o):syscalls.c:(.text.initialise_monitor_handles+0x0): first defined here
output/bl-v2/release/syscalls.o: In function `_kill’:
D:\work/src/drivers/syscalls.c:108: multiple definition of `_kill’


Hello All,

I enabled semihosting and add main function below.

int main(void)
{
/* Initialize STM32L4x HAL */
initialise_monitor_handles();

printf(“NIKHIL SUCCESS PRINT NIKHIL”);
/* my code

  • /

}

But when i do debug we are getting below logs on debug console.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x08076c3c in initialise_monitor_handles ()

Program received signal SIGTRAP, Trace/breakpoint trap.
0x08076ace in _swiopen ()

Program received signal SIGTRAP, Trace/breakpoint trap.
0x08076b4c in _get_semihosting_exts ()

Program received signal SIGTRAP, Trace/breakpoint trap.
0x080767fa in _swiread ()

Program received signal SIGTRAP, Trace/breakpoint trap.
0x08076928 in _swiclose ()

Program received signal SIGTRAP, Trace/breakpoint trap.
0x08076c76 in initialise_monitor_handles ()

Program received signal SIGTRAP, Trace/breakpoint trap.
0x08076c90 in initialise_monitor_handles ()

Program received signal SIGTRAP, Trace/breakpoint trap.
0x080769fa in _swistat ()

Any one can suggest what is missing here.

One more red log is comming as “”“No source available for “initialise_monitor_handles() at 0x8076c3c” “””

Thanks,
Nikhil