Can the 8ULP be debugged using serial download mode?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Can the 8ULP be debugged using serial download mode?

409件の閲覧回数
ko1596
Contributor I

I'm currently working on developing M33 for the i.mx8ULP platform. Unfortunately, the Evaluation Kit (EVK) provided by our solutions provider lacks a JTAG interface, requiring me to use the serial download mode for firmware updates.

To give you an overview of my debugging process for M33: I start by downloading the official SDK and using the MCUXpresso VSCode plugin to compile sdk20-app.bin. Following this, I rename sdk20-app.bin to m33_image.bin, as per the instructions provided by our solutions provider, and use the make SOC=iMX8ULP REV=A1 flash_singleboot_m33 command within the imx-boot tarball to package it into flash.bin. The final step involves burning this flash.bin to the M33 using UUU in serial download mode.

This workflow, however, seems highly inefficient to me. I'm curious if it's possible to streamline the debugging process by utilizing GDB within MCUXpresso for VSCode?

As someone new to 8ULP development, I'm in search of comprehensive learning materials specific to M33. Despite having reviewed various resources such as Industrial Products, the Reference Manual, and the Getting Started with MCUXpresso SDK for EVK, I still find myself uncertain about the origins of the programming and compiling techniques I'm currently employing.

For reference, I'm using SDK version SDK_2_15_000_MIMX8UD7xxx08 and the arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi toolchain.

Additionally, I've encountered issues with MCUXpresso for VSCode that seem to stem from discrepancies between the plugin and the SDK's compiler script, particularly in the setting of cmake. Here's the error I'm facing:

cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=debug .

 

[proc] 正在執行命令: /usr/bin/cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_TOOLCHAIN_FILE:FILEPATH=/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/tools/cmake_toolchain_files/armgcc.cmake -DLIBRARY_TYPE:STRING=NEWLIB -DLANGUAGE:STRING=C -DDEBUG_CONSOLE:STRING=UART -DPOSTPROCESS_UTILITY:STRING= -DSdkRootDirPath:STRING=/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP -S/home/joey/Workspace/evk9mimx8ulp_lpspi_interrupt_b2b_transfer_master/armgcc -B/home/joey/Workspace/evk9mimx8ulp_lpspi_interrupt_b2b_transfer_master/armgcc/debug -G Ninja

 

You can see that the above command generated by CMakeTools has -DLIBRARY_TYPE:STRING=NEWLIB added.
This causes a problem with {SDK_PATH}/tools/cmake_toolchain_files/armgcc.cmake:60 in the SDK.
The error that occurs is as follows

[build] [31/31 100% :: 0.628] Linking C executable /home/joey/Workspace/evk9mimx8ulp_hello_world/armgcc/debug/hello_world.elf
[build] FAILED: /home/joey/Workspace/evk9mimx8ulp_hello_world/armgcc/debug/hello_world.elf
[build] : && /home/joey/Toolchain/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -fstack-usage -D__NEWLIB__ -O0 -g -O0 -g -O0 -g -O0 -g -O0 -g -O0 -g -DDEBUG -DCPU_MIMX8UD5DVK10_cm33 -DPRINTF_FLOAT_ENABLE=0 -DSCANF_FLOAT_ENABLE=0 -DPRINTF_ADVANCED_ENABLE=0 -DSCANF_ADVANCED_ENABLE=0 -DSERIAL_PORT_TYPE_UART=1 -DMCUXPRESSO_SDK -g -O0 -mcpu=cortex-m33 -Wall -mthumb -MMD -MP -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mapcs -std=gnu99 -mfloat-abi=hard -mfpu=fpv5-sp-d16 -DSDK_DEBUGCONSOLE=1 -g -mcpu=cortex-m33 -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker -Map=output.map -Wl,--print-memory-usage -mfloat-abi=hard -mfpu=fpv5-sp-d16 --specs=nano.specs --specs=nosys.specs -T/home/joey/Workspace/evk9mimx8ulp_hello_world/armgcc/MIMX8UD5xxxxx_cm33_ram.ld -static CMakeFiles/hello_world.elf.dir/home/joey/Workspace/evk9mimx8ulp_hello_world/board.c.obj CMakeFiles/hello_world.elf.dir/home/joey/Workspace/evk9mimx8ulp_hello_world/clock_config.c.obj CMakeFiles/hello_world.elf.dir/home/joey/Workspace/evk9mimx8ulp_hello_world/empty_rsc_table.c.obj CMakeFiles/hello_world.elf.dir/home/joey/Workspace/evk9mimx8ulp_hello_world/hello_world.c.obj CMakeFiles/hello_world.elf.dir/home/joey/Workspace/evk9mimx8ulp_hello_world/pin_mux.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/devices/MIMX8UD5/drivers/fsl_clock.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/devices/MIMX8UD5/drivers/fsl_common.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/devices/MIMX8UD5/drivers/fsl_common_arm.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/devices/MIMX8UD5/system_MIMX8UD5_cm33.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/devices/MIMX8UD5/utilities/str/fsl_str.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/devices/MIMX8UD5/utilities/debug_console/fsl_debug_console.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/components/serial_manager/fsl_component_serial_manager.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/components/serial_manager/fsl_component_serial_port_uart.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/devices/MIMX8UD5/drivers/fsl_lpuart.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/components/uart/fsl_adapter_lpuart.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/components/lists/fsl_component_generic_list.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/devices/MIMX8UD5/utilities/fsl_assert.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/devices/MIMX8UD5/drivers/fsl_flexspi.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/devices/MIMX8UD5/gcc/startup_MIMX8UD5_cm33.S.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/devices/MIMX8UD5/drivers/fsl_cache.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/devices/MIMX8UD5/drivers/fsl_reset.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/devices/MIMX8UD5/drivers/fsl_upower.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/devices/MIMX8UD5/drivers/upower/upower_api.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/devices/MIMX8UD5/drivers/fsl_rgpio.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/devices/MIMX8UD5/drivers/fsl_fusion.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/devices/MIMX8UD5/drivers/fsl_trdc.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/devices/MIMX8UD5/drivers/fsl_sentinel.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/devices/MIMX8UD5/drivers/fsl_mu.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/devices/MIMX8UD5/utilities/fsl_sbrk.c.obj CMakeFiles/hello_world.elf.dir/home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/devices/MIMX8UD5/utilities/fsl_memcpy.S.obj -o /home/joey/Workspace/evk9mimx8ulp_hello_world/armgcc/debug/hello_world.elf -Wl,--start-group -lgcc -lc -lm -lcr_newlib_nohost -Wl,--end-group && cd /home/joey/SDK/SDK_2_13_0_EVK9-MIMX8ULP/boards/evk9mimx8ulp/demo_apps/adv_rtdfull/armgcc/debug && /home/joey/Toolchain/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-objcopy -Obinary /home/joey/Workspace/evk9mimx8ulp_hello_world/armgcc/debug/hello_world.elf /home/joey/Workspace/evk9mimx8ulp_hello_world/armgcc/debug/sdk20-app.bin
[build] /home/joey/Toolchain/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld: cannot find -lcr_newlib_nohost: No such file or directory
[build] collect2: error: ld returned 1 exit status
[build] ninja: build stopped: subcommand failed.

 

So I commented out the judgment and it compiles fine.

I would appreciate further assistance from everyone in the community.

 

#i.MX8ULP #MCUXpresso #MCUXpresso SDK Build

0 件の賞賛
返信
0 返答(返信)