This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDK for Mesh v1.0.0 with SES "invalid ASCII encoded byte:line 1"

I am trying to build and debug the Mesh v1.0.0 light-switch server example and getting a cryptic error when launching the debug.

My environment is Segger v3.30 on macOS. I picked up the SES .emProject and flash_placement.xml files from the examples/light_switch/server directory, but had to make several changes to the .emProject file.

When building I get a warning "cannot find entry symbol Reset_handler: defaulting to ..." but the build completes. When I thereafter initiate Debug>Go, the Output view shows "Preparing target for download" is completed and then there is a Segger GUI popup "invalid ASCII encoded byte:line 1"

Any suggestions on how to proceed would be welcome.

The top of my .emProject file shows the value of the 'linker_section_placement_macros', where the values were picked up from the .ld file in ..examples/light_switch/server/linker/nrf52832_xxAA_s132_5.0.0.ld

<!DOCTYPE CrossStudio_Project_File> <solution   Name="light_switch_server_nrf52832_xxAA_s132_5.0.0" target="8"   version="2">   <project Name="light_switch_server_nrf52832_xxAA_s132_5.0.0">
    <configuration
      Name="Common"
      arm_architecture="v7EM"
      arm_core_type="Cortex-M4"
      arm_endian="Little"
      arm_fp_abi="Hard"
      arm_fpu_type="FPv4-SP-D16"
      arm_linker_heap_size="1024"
      arm_linker_process_stack_size="0"
      arm_linker_stack_size="2048"
      arm_linker_treat_warnings_as_errors="No"
      arm_simulator_memory_simulation_parameter="RWX 00000000,00100000,FFFFFFFF;RWX 20000000,00010000,CDCDCDCD"
      arm_target_device_name="nrf52832_xxAA"
      arm_target_interface_type="SWD"
      c_preprocessor_definitions="NO_VTOR_CONFIG;NRF52;NRF52_SERIES;NRF52832;NRF52832_XXAA;S132;SOFTDEVICE_PRESENT;SD_BLE_API_VERSION=5;NRF_SD_BLE_API_VERSION=5;BOARD_PCA10040;CONFIG_GPIO_AS_PINRESET"
      c_user_include_directories="include;../include;../..;../../common/include;../../../external/nRF5_SDK_14.2.0_17b948a/components/drivers_nrf/delay;../../../models/simple_on_off/include;../../../models/config/include;../../../models/health/include;../../../mesh/access/api;../../../mesh/access/include;../../../mesh/prov/api;../../../mesh/prov/include;../../../external/nRF5_SDK_14.2.0_17b948a/components/boards;../../../external/nRF5_SDK_14.2.0_17b948a/components/drivers_nrf/hal;../../../external/nRF5_SDK_14.2.0_17b948a/components/libraries/util;../../../external/softdevice/s132_5.0.0/s132_nrf52_5.0.0_API/include;../../../external/softdevice/s132_5.0.0/s132_nrf52_5.0.0_API/include/nrf52;../../../mesh/core/api;../../../external/nRF5_SDK_14.2.0_17b948a/components/device;../../../external/nRF5_SDK_14.2.0_17b948a/components/toolchain;../../../external/nRF5_SDK_14.2.0_17b948a/components/toolchain/cmsis/include;../../../external/nRF5_SDK_14.2.0_17b948a/components/toolchain/gcc;../../../external/nRF5_SDK_14.2.0_17b948a/components/toolchain/dsp/GCC;../../../external/rtt/include;../../../mesh/core/include;../../../mesh/dfu/api;../../../mesh/dfu/include;../../../mesh/prov/api;../../../mesh/prov/include;../../../mesh/bearer/api;../../../mesh/bearer/include;../../../external/micro-ecc;../../../mesh/core/include;"
      debug_additional_load_file="$(ProjectDir)/../../../external/softdevice/s132_5.0.0/s132_nrf52_5.0.0_softdevice.hex"
      debug_start_from_entry_point_symbol="No"
      debug_target_connection="J-Link"
      linker_output_format="hex"
      linker_printf_width_precision_supported="No"
      linker_section_placement_file=""
      linker_section_placement_macros="FLASH_PH_START=0x0;FLASH_START=0x23000;FLASH_SIZE=0x55000;FLASH_PH_SIZE=0x80000;RAM_PH_START=0x20000000;RAM_PH_SIZE=0x10000;RAM_START=0x200031b0;RAM_SIZE=0xcb50"
      linker_section_placements_segments="FLASH RX 0x00000000 0x78000;RAM RWX 0x20000000 0xf000"
      project_directory=""
      project_type="Executable" />
    <folder Name="Application">
      <file file_name="src/main.c" />
      <file file_name="../../nrf_mesh_sdk.c" />
Parents
  • @Hung: The .emProject file in the Mesh SDK had following issues: a) Referred to $(StudioDir)/targets/Cortex_M/flash_placement.xml, which in my case caused build/link errors. I imported and modified a flash_placement.xml file from the SDK 14.2 ble-app_hrs example b) The above flash_placement file required additional defines for the section_placement_macros ( PH) c) Had to add loading of Softdevice d) Property groups not set (should work anyways)

    I see the bundled file has different values for the FLASH_SIZE and RAM_SIZE. (I'll test changing these) Do these also always have to match the values in "linker_section_placements_segments"? Unclear what you mean "..Download the hex to flash" -I didn't see any pre-built light-server examples. I haven't tried running the same example in Mesh SDK v0.10.1 Alpha, but successfully ran several examples from SDK14.2. I see the bundled .emProject doesn't have "gcc_entry_point="Reset handler". Can I just remove this line?

Reply
  • @Hung: The .emProject file in the Mesh SDK had following issues: a) Referred to $(StudioDir)/targets/Cortex_M/flash_placement.xml, which in my case caused build/link errors. I imported and modified a flash_placement.xml file from the SDK 14.2 ble-app_hrs example b) The above flash_placement file required additional defines for the section_placement_macros ( PH) c) Had to add loading of Softdevice d) Property groups not set (should work anyways)

    I see the bundled file has different values for the FLASH_SIZE and RAM_SIZE. (I'll test changing these) Do these also always have to match the values in "linker_section_placements_segments"? Unclear what you mean "..Download the hex to flash" -I didn't see any pre-built light-server examples. I haven't tried running the same example in Mesh SDK v0.10.1 Alpha, but successfully ran several examples from SDK14.2. I see the bundled .emProject doesn't have "gcc_entry_point="Reset handler". Can I just remove this line?

Children
No Data
Related