physical-computation / Warp-firmware

Firmware for the Cambridge Physical Computation Laboratory's Warp Embedded Multi-Sensor Platform.
http://physcomp.eng.cam.ac.uk
BSD 3-Clause "New" or "Revised" License
5 stars 198 forks source link

Fix `caddr_t` compilation errors #112

Closed matiasilva closed 1 year ago

matiasilva commented 1 year ago

Two files in the Freescale SDK make use of caddr_t which is a presently unused data type. This StackExchange discussion sheds more light into it and instructs all references of this type to be replaced with void *, which is what I have done in this PR.

I'm not too sure why I got this error and some of my colleagues didn't, I can only assume it is because of my development platform: macOS Ventura with the latest ARM GNU toolchain downloaded 1 day ago: 12.2 rel-1.

I'm not even sure if this is the right fix or if this breaks something, but I couldn't think of any alternatives. The function using this _sbrk itself confuses me as it is defined twice in two files with one conditionally existing on a couple of #defines that I don't have the time to look for. Might this be function overloading?

The firmware successfully compiled for me after this, so...