discovery icon indicating copy to clipboard operation
discovery copied to clipboard

Fix .cargo/config for missing targets

Open gbip opened this issue 8 years ago • 2 comments

Hello, I can't seem to build with Xargo by following the instruction because the .cargo/config was missing instructions for my board.

Here is the fixed .cargo/config that should work for all boards :

[target.thumbv7em-none-eabihf]
rustflags = [ 
  "-C",
  "link-arg=-Tstm32f3discovery.ld",
  "-C",
  "link-arg=-nostartfiles",
]

[target.thumbv7em-none-eabi]
rustflags = [ 
  "-C",
  "link-arg=-Tstm32f3discovery.ld",
  "-C",
  "link-arg=-nostartfiles",
]


[target.thumbv7m-none-eabi]
rustflags = [ 
  "-C",
  "link-arg=-Tstm32f3discovery.ld",
  "-C",
  "link-arg=-nostartfiles",
]

[target.thumbv6m-none-eabi]
rustflags = [ 
  "-C",
  "link-arg=-Tstm32f3discovery.ld",
  "-C",
  "link-arg=-nostartfiles",
]

If I have the time, I will make a pull request.

gbip avatar Jun 08 '17 19:06 gbip

Here is the fixed .cargo/config that should work for all boards :

What do you mean by "all boards"? This tutorial is only meant to be followed with a STM32F3DISCOVERY board. Trying to follow it with any other DISCOVERY board will very likely not work.

japaric avatar Jun 10 '17 17:06 japaric

My bad I read all the introduction stuff and thought, let's try with an other board (not even a DISCOVERY board). Modifying .cargo/config fixed the linking issue, but even with a simple program the tutorial does not work very well with an other board. Anyway, that was worth trying at least.

gbip avatar Jun 10 '17 17:06 gbip