ATSAMD5xx Port Help

This forum is about you. Feel free to discuss anything is related to embedded and electronics, your awesome projects, your ideas, your announcements, not necessarily related to ChibiOS but to embedded in general. This forum is NOT for support.
ash0x0
Posts: 2
Joined: Tue Apr 07, 2020 7:18 pm
Has thanked: 1 time

ATSAMD5xx Port Help

Postby ash0x0 » Sat Apr 11, 2020 4:24 pm

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.

User avatar
Giovanni
Site Admin
Posts: 12962
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 735 times
Been thanked: 610 times
Contact:

Re: ATSAMD5xx Port Help

Postby Giovanni » Sat Apr 11, 2020 4:54 pm

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

ash0x0
Posts: 2
Joined: Tue Apr 07, 2020 7:18 pm
Has thanked: 1 time

Re: ATSAMD5xx Port Help

Postby ash0x0 » Sat Apr 11, 2020 11:08 pm

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.


Return to “User Projects”

Who is online

Users browsing this forum: No registered users and 1 guest