* Microcontroller Cross Compiler
@ 2014-12-18 19:09 Darcy Watkins
2014-12-19 13:21 ` Andrea Adami
0 siblings, 1 reply; 5+ messages in thread
From: Darcy Watkins @ 2014-12-18 19:09 UTC (permalink / raw)
To: yocto@yoctoproject.org
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@sierrawireless.com :: www.sierrawireless.com :: www.inmotiontechnology.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Microcontroller Cross Compiler
2014-12-18 19:09 Microcontroller Cross Compiler Darcy Watkins
@ 2014-12-19 13:21 ` Andrea Adami
2014-12-21 22:57 ` João Henrique Ferreira de Freitas
0 siblings, 1 reply; 5+ messages in thread
From: Andrea Adami @ 2014-12-19 13:21 UTC (permalink / raw)
To: Darcy Watkins; +Cc: yocto@yoctoproject.org
On Thu, Dec 18, 2014 at 8:09 PM, Darcy Watkins
<dwatkins@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@sierrawireless.com :: www.sierrawireless.com :: www.inmotiontechnology.com
>
> --
> _______________________________________________
> yocto mailing list
> yocto@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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Microcontroller Cross Compiler
2014-12-19 13:21 ` Andrea Adami
@ 2014-12-21 22:57 ` João Henrique Ferreira de Freitas
2014-12-22 4:24 ` 彥瑾
2014-12-22 12:51 ` Burton, Ross
0 siblings, 2 replies; 5+ messages in thread
From: João Henrique Ferreira de Freitas @ 2014-12-21 22:57 UTC (permalink / raw)
To: yocto
Hi,
I have the same requirement.
I will try it. But in my case I need to use this
https://launchpad.net/gcc-arm-embedded.
There are some way to yocto creates the gcc-arm-embedded SDK? Instead of
use the gcc-arm-embedded packages. Is it feasibly?
Thanks.
On 19/12/2014 11:21, Andrea Adami wrote:
> On Thu, Dec 18, 2014 at 8:09 PM, Darcy Watkins
> <dwatkins@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@sierrawireless.com :: www.sierrawireless.com :: www.inmotiontechnology.com
>>
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Microcontroller Cross Compiler
2014-12-21 22:57 ` João Henrique Ferreira de Freitas
@ 2014-12-22 4:24 ` 彥瑾
2014-12-22 12:51 ` Burton, Ross
1 sibling, 0 replies; 5+ messages in thread
From: 彥瑾 @ 2014-12-22 4:24 UTC (permalink / raw)
To: yocto
[-- Attachment #1: Type: text/plain, Size: 3364 bytes --]
Though it's not the same case, but I use yocto to build the android-system
with the prebuilt bionic toolchain shipped with android manifest.
So generally speaking, you can use prebuilt toolchain with customize
makefile to make building MCU's binary in yocto.
But if you want to use yocto to build the embedded toolchain, there maybe
lots to work.
the recipes I build android-system is here:
https://github.com/aosp-hybris/meta-aosp-hybris/blob/master/recipes-android/android-system/android-system.inc
2014-12-22 6:57 GMT+08:00 João Henrique Ferreira de Freitas <
joaohf@gmail.com>:
>
> Hi,
>
> I have the same requirement.
>
> I will try it. But in my case I need to use this
> https://launchpad.net/gcc-arm-embedded.
>
> There are some way to yocto creates the gcc-arm-embedded SDK? Instead of
> use the gcc-arm-embedded packages. Is it feasibly?
>
> Thanks.
>
>
>
> On 19/12/2014 11:21, Andrea Adami wrote:
>
>> On Thu, Dec 18, 2014 at 8:09 PM, Darcy Watkins
>> <dwatkins@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@sierrawireless.com :: www.sierrawireless.com ::
>>> www.inmotiontechnology.com
>>>
>>> --
>>> _______________________________________________
>>> yocto mailing list
>>> yocto@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
>>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
[-- Attachment #2: Type: text/html, Size: 5169 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Microcontroller Cross Compiler
2014-12-21 22:57 ` João Henrique Ferreira de Freitas
2014-12-22 4:24 ` 彥瑾
@ 2014-12-22 12:51 ` Burton, Ross
1 sibling, 0 replies; 5+ messages in thread
From: Burton, Ross @ 2014-12-22 12:51 UTC (permalink / raw)
To: João Henrique Ferreira de Freitas; +Cc: yocto@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 643 bytes --]
On 21 December 2014 at 22:57, João Henrique Ferreira de Freitas <
joaohf@gmail.com> wrote:
>
> I will try it. But in my case I need to use this
> https://launchpad.net/gcc-arm-embedded.
>
> There are some way to yocto creates the gcc-arm-embedded SDK? Instead of
> use the gcc-arm-embedded packages. Is it feasibly?
>
Yes, you "just" need to write a recipe to build the cross compilers,
install them into the sysroot, and then use those compilers when building
the MCU binaries.
Building a toolchain isn't trivial but if it's actually a specific GCC
combination then you may be able to re-use the gcc-cross recipes.
Ross
[-- Attachment #2: Type: text/html, Size: 1187 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-12-22 12:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-18 19:09 Microcontroller Cross Compiler Darcy Watkins
2014-12-19 13:21 ` Andrea Adami
2014-12-21 22:57 ` João Henrique Ferreira de Freitas
2014-12-22 4:24 ` 彥瑾
2014-12-22 12:51 ` Burton, Ross
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.