Page 1 of 1

ATSAMD5xx Port Help

Posted: Sat Apr 11, 2020 4:24 pm
by ash0x0
Hi,

I'm trying to create a port for ATSAMD51J18A and I''m following the port guide. Given that this is a new MCU with Cortex-M4 core, I'm following the third option but some of the directories mentioned don't exist (./os/hal/platforms). I've looked at some of the other ports, specifically the ATSAMA5D2 and STM32F4 for guidance and they have a different directory structure than the guide mentions. The guide is also not recent (revised 2011) so I'm wondering how correct it is and if I should follow it?
Are there any other sources/port guides I should be following as well? This is my first foray in any RTOS or embedded system software and I'm using the book plus the port guide and existing ports to guide me.

Thanks

P.S. I'm not sure if this is in the correct location. If not, I apologize and feel free to move it.

Re: ATSAMD5xx Port Help

Posted: Sat Apr 11, 2020 4:54 pm
by Giovanni
Hi,

That guide is quite old, replace "platform" with "ports". The structure inside is up to you, personally I create a LLD directory with drivers common to all devices and a directory for each device sub-family, for example STM32F4xx. Look under /os/hal/ports/STM32 and follow that pattern, it is not mandatory, the organization can change, other ports are done differently.

Be warned that creating AND maintaining an HAL port is an important time investment. I would start with the PAL driver and reach "flashing LEDs" level of functionality, then proceed with other things.

Giovanni

Re: ATSAMD5xx Port Help

Posted: Sat Apr 11, 2020 11:08 pm
by ash0x0
Hi Giovanni,

Thanks for the guidance. It'll probably take me weeks to get flashing leds but I'll update then. Thanks for the warning too, I know it'll take lots of time and effort, hopefully I can get it done.

Re: ATSAMD5xx Port Help

Posted: Tue Nov 22, 2022 7:52 pm
by tfAteba
Hi ash0x0,

Did you finally have some result in your port? I'm curious to know how it goes.