zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.81k stars 6.59k forks source link

GSM modem example on stm32f103 bluepill #26829

Closed hasikp1 closed 4 years ago

hasikp1 commented 4 years ago

I am trying to use gsm_modem example with stm32 blue pill and SIM7000 modem. I have used following command to build using west. west build -b stm32_min_dev_blue samples/net/gsm_modem -p auto -- -DCONFIG_MODEM_GSM_APN=\"mobitel3g\" -DCONFIG_MODEM_GSM_UART_NAME=\"UART_3\"

I got the following error

[174/179] Linking C executable zephyr\zephyr_prebuilt.elf
FAILED: zephyr/zephyr_prebuilt.elf
cmd.exe /C "cd . && C:\GNU_AR~1\92020-~1\bin\AR19DD~1.EXE    zephyr/CMakeFiles/zephyr_prebuilt.dir/misc/empty_file.c.obj  -o zephyr\zephyr_prebuilt.elf  -Wl,-T  zephyr/linker.cmd  -Wl,-Map=C:/zephyrproject/zephyr/build/zephyr/zephyr_prebuilt.map  -Wl,--whole-archive  app/libapp.a  zephyr/libzephyr.a  zephyr/arch/common/libarch__common.a  zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a  zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a  zephyr/lib/libc/minimal/liblib__libc__minimal.a  zephyr/lib/posix/liblib__posix.a  zephyr/boards/arm/stm32_min_dev/libboards__arm__stm32_min_dev.a  zephyr/subsys/net/libsubsys__net.a  zephyr/subsys/net/l2/ppp/libsubsys__net__l2__ppp.a  zephyr/subsys/net/ip/libsubsys__net__ip.a  zephyr/subsys/net/lib/conn_mgr/libsubsys__net__lib__conn_mgr.a  zephyr/drivers/gpio/libdrivers__gpio.a  zephyr/drivers/serial/libdrivers__serial.a  modules/stm32/stm32cube/lib..__modules__hal__stm32__stm32cube.a  -Wl,--no-whole-archive  zephyr/kernel/libkernel.a  zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj  -L"c:/gnu_arm_embedded/9 2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v7-m/nofp"  -LC:/zephyrproject/zephyr/build/zephyr  -lgcc  -Wl,--print-memory-usage  -mcpu=cortex-m3  -mthumb  -mabi=aapcs  -Wl,--gc-sections  -Wl,--build-id=none  -Wl,--sort-common=descending  -Wl,--sort-section=alignment  -Wl,-u,_OffsetAbsSyms  -Wl,-u,_ConfigAbsSyms  -nostdlib  -static  -no-pie  -Wl,-X  -Wl,-N  -Wl,--orphan-handling=warn && cd ."
Memory region         Used Size  Region Size  %age Used
           FLASH:       84668 B        64 KB    129.19%
            SRAM:       37920 B        20 KB    185.16%
        IDT_LIST:         168 B         2 KB      8.20c:/gnu_ar~1/92020-~1/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe: zephyr\zephyr_prebuilt.elf section `text' will not fit in region `FLASH'

Is it possible to reduce the RAM and FLASH usage? If yes what is the command that I can use.

jukkar commented 4 years ago

Sorry for very late reply, I just noticed this question.

As you noticed, the blue pill is quite limited use, there just isn't much available memory to do any network related activities. I am afraid you need to think some other device for modem development. I would recommend black pill https://docs.zephyrproject.org/latest/boards/arm/blackpill_f411ce/doc/index.html it works well and has much more memory (both RAM and flash). They are also very affordable, just bought some for about $5 a piece.