paoloteti / ti-hercules-bsp

Bare Metal Board Support Package for Texas Instruments Cortex-R4F/R5F TMS570
Other
25 stars 4 forks source link

Information for linking with lld #11

Closed kamathba closed 5 years ago

kamathba commented 5 years ago

I think you may be moving in the direction of linking applications using lld. If that is the case, do you have an example of hercules-based application that does so?

rust-lld: error: undefined symbol: hint
          >>> referenced by asm.rs:20 ...

Starting to try this out again on the cortex-r5 chips and thought it might be interesting to try ditching arm-none-eabi-gcc for linking just to experiment.

paoloteti commented 5 years ago

Take a look at 'tms570ls0714' crate. It should link with lld with minor change on bsp.ld.

cyrusmetcalf commented 5 years ago

I'm working on a port of this support package for the TMS570LC4357 right now. I can't seem to get past this same issue of hint at asm.rs:20 not being referenced at link time.

The problem can be bypassed by enabling compiler optimizations, however that makes debugging significantly more challenging.

Can you offer up any information on how I can get past this?

paoloteti commented 5 years ago

Cargo.toml is designed to enable optimization only on few crates. (use profile-overrides for cortex-r as already for for vcell)

BTW gcc is and still remaing the prefereed choice for Cortex-R.

paoloteti commented 5 years ago

@cyrusmetcalf Issue closed. Please update to latest master.