nuttx/arch/avr/include
Raman Gopalan 0967eb4c24 avr32dev1: Fix compilation and nsh boot-up
I recently imported NuttX version 6.0 (and nsh) into a Microchip
Studio project [1] on Windows to figure out what was going wrong with
the avr32dev1 build. I also briefly checked NuttX version 10.

I worked with the assumption that the avr32 (avr32dev1) specific
changes to the codebase were minimal across NuttX releases.

For the initial proof of concept I used Microchip Studio version 7.0
(with the recent Microchip's ASF updates). I use avr32-gcc (4.4.7)
hosted here [2] for building NuttX for avr32dev1 on GNU/Linux.

Even with the Microchip Studio project, I had initial debug problems
with just stepping through the code a line at a time. I had to bring
in crt0, a trampoline stub and the linker file from one of my older
projects to really build on the suspicion I had with the linker file.

Perhaps an older version of avr32-gcc did something differently. I am
not sure about this. I used avr32-objdump to see the output sections
of the generated elf file. I just had to tweak the linker script to
ensure correct linking of the sections.

With those changes, I was able to inspect the UART sections within
NuttX Microchip Studio project.

Second important change: the transmit pin: I had to reassign the pin
to see the nsh console.

These are the currently assigned UART pins:

RX: PA_24 -> Physical IC pin 59
TX: PB_02 -> Physical IC pin 24

For the avr32dev1 board, they are pins: J1 (berg pin 28) and J2 (berg
pin 10).

In addition, the PR fixes silly compilation problems with avr32dev1.

I have tested the nsh build with my avr32dev1 boards. I used Atmel ICE
to program one of them (flash at 0x80000000) and dfu-programmer to
test my other board (flash at 0x80002000). The other RS-232 parameters
are the same as they were.

References:
[1]: https://github.com/ramangopalan/nuttx_avr32dev1
[2]: https://github.com/ramangopalan/avr32-gnu-toolchain-linux_x86_64
2024-02-08 11:12:13 -03:00
..
at32uc3 arhc: avr: nxstyle fixes 2021-03-31 21:12:05 -05:00
at90usb
atmega arhc: avr: nxstyle fixes 2021-03-31 21:12:05 -05:00
avr Indent the define statement by two spaces 2023-05-21 09:52:08 -03:00
avr32 avr32dev1: Fix compilation and nsh boot-up 2024-02-08 11:12:13 -03:00
xmega arhc: avr: nxstyle fixes 2021-03-31 21:12:05 -05:00
.gitignore
arch.h Indent the include statement by two spaces 2023-05-16 12:34:32 -03:00
debug.h include: fix double include pre-processor guards 2022-01-16 11:11:14 -03:00
inttypes.h arch: Omni Hoverboards: update licenses to Apache 2021-09-28 04:37:38 -07:00
irq.h Indent the include statement by two spaces 2023-05-16 12:34:32 -03:00
limits.h Indent the include statement by two spaces 2023-05-16 12:34:32 -03:00
syscall.h arch: Remove the duplicated syscall.h in each arch 2022-02-27 22:54:13 +08:00
types.h Indent the include statement by two spaces 2023-05-16 12:34:32 -03:00