This pull request fixes regressions in the mcu_tiva_c platform tree allowing Zinc to be built for the Stellaris Launchpad and Tiva C boards. I've test-compiled a boilerplate project onto my Stellaris Launchpad which works, and I've compiled a few of the tiva_c_* projects under examples/, which built fine as well, although I haven't flashed them to any boards yet.
Apologies for the messy commits. I hope the overall diff makes apparent what I did. There's a lot of .unwrap() unsafe code in the platform tree files, but that seems to be on par with the lpc17xx files, so I left my changes as is. An incorrect platform tree will panic with no error currently, but that seems to be a general issue with Zinc at the moment as the codebase is still in flux.
Notable changes:
Closures like |&: err: &str | no longer need &:; the compiler infers this part
String::as_slice() doesn't exist any more, so I converted those occurrences to String::as_str()
I've commented out #![deny(missing_docs)] in src/lib.rs as it fails builds. Obviously documentation is a good thing, but I feel it's outside the scope of this PR which is just to get the Tiva C build working again.
Software versions:
macOS Sierra
$ rustc --version
rustc 1.13.0-nightly (6ffdda1ba 2016-09-14)
$ arm-none-eabi-ld --version
GNU ld (GNU Tools for ARM Embedded Processors) 2.24.0.20150921
Thank you to the Zinc team for making it possible to write Rust on ARM CPUs!
Coverage decreased (-6.5%) to 85.657% when pulling a543993d75fd9e362116362a2ae3ef3a6941b27d on jamwaffles:tiva-c-regression-fix into 0b38933dd1b188e02be61a65c94caa6fa64d0420 on hackndev:master.
Coverage decreased (-6.5%) to 85.657% when pulling a543993d75fd9e362116362a2ae3ef3a6941b27d on jamwaffles:tiva-c-regression-fix into 0b38933dd1b188e02be61a65c94caa6fa64d0420 on hackndev:master.
Coverage decreased (-6.5%) to 85.657% when pulling a543993d75fd9e362116362a2ae3ef3a6941b27d on jamwaffles:tiva-c-regression-fix into 0b38933dd1b188e02be61a65c94caa6fa64d0420 on hackndev:master.
Coverage decreased (-6.5%) to 85.657% when pulling a543993d75fd9e362116362a2ae3ef3a6941b27d on jamwaffles:tiva-c-regression-fix into 0b38933dd1b188e02be61a65c94caa6fa64d0420 on hackndev:master.
Coverage decreased (-6.5%) to 85.657% when pulling 219b5ddb1947341ade404354a5d391f9092911e1 on jamwaffles:tiva-c-regression-fix into 0b38933dd1b188e02be61a65c94caa6fa64d0420 on hackndev:master.
Coverage decreased (-6.5%) to 85.657% when pulling 219b5ddb1947341ade404354a5d391f9092911e1 on jamwaffles:tiva-c-regression-fix into 0b38933dd1b188e02be61a65c94caa6fa64d0420 on hackndev:master.
Coverage decreased (-6.5%) to 85.657% when pulling 219b5ddb1947341ade404354a5d391f9092911e1 on jamwaffles:tiva-c-regression-fix into 0b38933dd1b188e02be61a65c94caa6fa64d0420 on hackndev:master.
Coverage decreased (-6.5%) to 85.657% when pulling 831994fb6045b64f44b8585f38cf343860c7c55f on jamwaffles:tiva-c-regression-fix into 0b38933dd1b188e02be61a65c94caa6fa64d0420 on hackndev:master.
This pull request fixes regressions in the
mcu_tiva_c
platform tree allowing Zinc to be built for the Stellaris Launchpad and Tiva C boards. I've test-compiled a boilerplate project onto my Stellaris Launchpad which works, and I've compiled a few of thetiva_c_*
projects underexamples/
, which built fine as well, although I haven't flashed them to any boards yet.Apologies for the messy commits. I hope the overall diff makes apparent what I did. There's a lot of
.unwrap()
unsafe code in the platform tree files, but that seems to be on par with the lpc17xx files, so I left my changes as is. An incorrect platform tree will panic with no error currently, but that seems to be a general issue with Zinc at the moment as the codebase is still in flux.Notable changes:
|&: err: &str |
no longer need&:
; the compiler infers this partString::as_slice()
doesn't exist any more, so I converted those occurrences toString::as_str()
#![deny(missing_docs)]
insrc/lib.rs
as it fails builds. Obviously documentation is a good thing, but I feel it's outside the scope of this PR which is just to get the Tiva C build working again.Software versions:
macOS Sierra
Thank you to the Zinc team for making it possible to write Rust on ARM CPUs!