Skip to content

Failed to run 03-setup on macOS #21

@huisedenanhai

Description

@huisedenanhai

macOS
rustc 1.83.0 (90b35a623 2024-11-26)

cargo build log

   Compiling semver-parser v0.7.0
   Compiling proc-macro2 v1.0.94
   Compiling unicode-ident v1.0.18
   Compiling cortex-m v0.7.7
   Compiling cortex-m-rt v0.7.5
   Compiling critical-section v1.2.0
   Compiling nb v1.1.0
   Compiling void v1.0.2
   Compiling nb v0.1.3
   Compiling vcell v0.1.3
   Compiling bitfield v0.13.2
   Compiling volatile-register v0.2.2
   Compiling embedded-hal v0.2.7
   Compiling nrf52833-pac v0.12.2
   Compiling ufmt-write v0.1.0
   Compiling semver v0.9.0
   Compiling rtt-target v0.5.0
   Compiling rtt-check v0.1.0 (/Users/l/Desktop/Projects/discovery-mb2/mdbook/src/03-setup)
   Compiling rustc_version v0.2.3
   Compiling panic-rtt-target v0.1.3
   Compiling bare-metal v0.2.5
   Compiling quote v1.0.40
   Compiling syn v2.0.100
   Compiling cortex-m-rt-macros v0.7.5
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 10.41s
      Config default
      Target /Users/l/Desktop/Projects/discovery-mb2/target/thumbv7em-none-eabihf/debug/rtt-check
 WARN probe_rs::flashing::loader: No loadable segments were found in the ELF file.
       Error No loadable segments were found in the ELF file.

The generated elf file has no .text section

arm-none-eabi-objdump -h /Users/l/Desktop/Projects/discovery-mb2/target/thumbv7em-none-eabihf/debug/rtt-check


/Users/l/Desktop/Projects/discovery-mb2/target/thumbv7em-none-eabihf/debug/rtt-check:     file format elf32-littlearm

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .debug_abbrev 000021b1  00000000  00000000  00000094  2**0
                  CONTENTS, READONLY, DEBUGGING, OCTETS
  1 .debug_info   0002e247  00000000  00000000  00002245  2**0
                  CONTENTS, READONLY, DEBUGGING, OCTETS
  2 .debug_aranges 00001b00  00000000  00000000  0003048c  2**0
                  CONTENTS, READONLY, DEBUGGING, OCTETS
  3 .debug_ranges 0001c730  00000000  00000000  00031f8c  2**0
                  CONTENTS, READONLY, DEBUGGING, OCTETS
  4 .debug_str    00046ccb  00000000  00000000  0004e6bc  2**0
                  CONTENTS, READONLY, DEBUGGING, OCTETS
  5 .comment      00000099  00000000  00000000  00095387  2**0
                  CONTENTS, READONLY
  6 .ARM.attributes 0000003a  00000000  00000000  00095420  2**0
                  CONTENTS, READONLY
  7 .debug_frame  00005a98  00000000  00000000  0009545c  2**2
                  CONTENTS, READONLY, DEBUGGING, OCTETS
  8 .debug_line   00025417  00000000  00000000  0009aef4  2**0
                  CONTENTS, READONLY, DEBUGGING, OCTETS
  9 .debug_loc    0000019a  00000000  00000000  000c030b  2**0
                  CONTENTS, READONLY, DEBUGGING, OCTETS

I'm new to embedded system development. Not sure how to fix it. But there seems to be some problem in generated code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions