New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting ".vector_table is shorter than expected" error with MSP430 quickstart + custom memory.x #2
Comments
(This will take me a few days to get back to... I'm trying to get a project out the door before Thanksgiving, tho that's seeming increasingly unlikely lol). Can you give me a link to your repo with your changes to the quickstart so I can see?
This isn't strictly wrong, but it's not likely to work. Could I see your example in this state as well (I may need to update some docs w/ the quickstart that |
I started a clean project since my work was mixed up with some client-specific notes: https://github.com/natevw/msp430f5529-repro
UPDATE: figured out the difference and got rid of the |
@natevw Okay, so you're running into a cascade of bugs, that aren't necessarily related to each other. For future-me, and just so it's clear what's going on, I'm going to document them here. TL;DR, use this, until I can update [package]
authors = ["Nathan Vander Wilt <nate@calftrail.com>"]
edition = "2018"
readme = "README.md"
name = "msp430f5529-repro"
version = "0.1.0"
[dependencies]
msp430 = { version = "0.3.0" }
msp430-rt = "0.3.0"
panic-msp430 = "0.3.0"
# Use an existing PAC to ensure examples and the crate itself compiles. If
# targeting a different device, you may need to change the version of your
# crate. Your PAC must be generated with svd2rust version v0.20.0 or later.
[dependencies.msp430f5529]
version = "0.2.0"
features = ["rt"]
# Required for `cargo fix` to work!
[[bin]]
name = "msp430f5529-repro"
test = false
bench = false
[profile.release]
opt-level = "s" # Size is more important than performance on MSP430.
codegen-units = 1 # Better size optimization.
lto = "fat" # _Much_ better size optimization.
# debug = true # Debug _can_ slightly increase size of .text segment.
Remarks
This is a link error. The If you don't enable the
At this point, the same scenario applies;
The comment accurately describes what's happening here; two versions of
The linker script generated by
This is a "you have two versions of
This is expected and normal. Your |
@cr1901 Thanks much! I suspect I'll be coming back to read through these notes myself too; quite new to Rust in general and I'm admittedly diving straight into the deep end using it for MSP430, so it's very helpful to see your troubleshooting process detailed out like this. Appreciate the workaround as well. |
I'm getting an error
when I attempt to compile a dependent of this crate:
This is with a
memory.x
which I believe is correct (enough — n.b. doesn't include all the Flash area…) for this processor?I have tried a
cargo clean
in case an earlier PAC for a different microprocessor was still interfering. Via #1 (comment) I wondered if this is also because of a conflictingmsp430 = "0.4.0"
in my app but0.3.0
in this crate, but I tried downgrading my sample code (which is really just the plain msp430 quickstart at this point) to0.3.0
as well but the exact same error.The text was updated successfully, but these errors were encountered: