Samd21 build help - include of hal_gpio

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
MCHobby
Posts: 52
Joined: Mon Jan 26, 2015 2:05 pm
Contact:

Samd21 build help - include of hal_gpio

Post by MCHobby » Fri Apr 30, 2021 8:33 pm

Hi, I'm working on Samd21 build.
I did already prepared the machine.Pin class and the firmware get compiled properly (and run perfectly).
Now I have to connect the pipes between the Pin class and the MCU.

I have two options:
1) Manipulates MCU registers (looks easy but will implies bit shifting operations).
2) use the samd21 hal_gpio.h, my preferred solution but I can't get it included without compilation error.

I did located the hal_gpio there:

Code: Select all

@samd21:~/micropython/lib/asf4$ find . -name 'hal_gpio.*'
./samd51/hal/include/hal_gpio.h
./samd51/hal/src/hal_gpio.c
./samd21/hal/include/hal_gpio.h  <--------
./samd21/hal/src/hal_gpio.c
How can I include it into the build?
I think that the Makefile should be updated to perform the proper inclusions (maybe in the INC section). However, I do not know how to move forward on that point.

Some helps/guidance would be really appreciated.
Dominique

MCHobby
Posts: 52
Joined: Mon Jan 26, 2015 2:05 pm
Contact:

Re: Samd21 build help - include of hal_gpio

Post by MCHobby » Sat May 01, 2021 9:09 pm

I did finally find my way in manipulating the MCU registers.

Post Reply