[yocto] Microcontroller Cross Compiler

Andrea Adami andrea.adami at gmail.com
Fri Dec 19 05:21:08 PST 2014


On Thu, Dec 18, 2014 at 8:09 PM, Darcy Watkins
<dwatkins at sierrawireless.com> wrote:
> Hello,
>
> In my target system I have a microcontroller (MCU) that handles some I/O, power supplies and system boot up to the point of taking the main CPU out of reset.  At present, we build the MCU firmware from source and then the binary file is packaged to be used as payload with an MCU firmware update utility.
>
> Now my main question...  does anyone have suggestions (or is there a 'yocto' way) to build such a cross compiler for the MCU so that it can be invoked to build MCU firmware from source as part of the bitbake build for the Linux target's image.  The idea would be to build MCU firmware image from source using the MCU cross compiler, but obviously to build drivers and utilities that run on the main CPU using the normal cross-compiler toolchains built under yocto.  Then I could package the payload firmware image along with utilities all as part of the same RPM package.
>
> The MCU cross compiler we use was originally generated using crosstool-ng, and is essentially a gcc cross compiler for 'bare metal' MCU target.
>
> Does anyone who has gone down this road have suggestions?
>
> Thanks in advance!
>
>
> Regards,
>
> Darcy
>
> Darcy Watkins ::  Staff Engineer, Firmware
>
> SIERRA WIRELESS
> Direct  +1 604 233 7989   ::  Fax  +1 604 231 1109  ::  Main  +1 604 231 1100
> 13811 Wireless Way  :: Richmond, BC Canada V6V 3A4
> [P2]
> dwatkins at sierrawireless.com :: www.sierrawireless.com :: www.inmotiontechnology.com
>
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto

Hi Darcy,

if I understand correctly you use the standard toolchain for the
target image and a custom $CC to build one custom binary.

We use klcc for a couple of klibc-static-recipes thus we created a
.bbclass to be inherited.
See http://cgit.openembedded.org/meta-openembedded/tree/meta-initramfs/classes/klibc.bbclass

Regards

Andrea



More information about the yocto mailing list