nuttx/libs/libc
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
..
aio
assert avr32dev1: Fix compilation and nsh boot-up 2024-02-08 11:12:13 -03:00
audio
bin
builtin libs/libc: adapt the cmake script from the makefile 2023-11-07 17:39:03 +01:00
ctype
dirent
dlfcn
errno
eventfd
fdt CMake:init arm64 CMake qemu-armv8a build 2023-12-27 07:27:17 -08:00
fixedmath
gdbstub support gdbstub use serial. 2023-12-11 08:43:26 -08:00
gpsutils libs/libc: adapt the cmake script from the makefile 2023-11-07 17:39:03 +01:00
grp
hex2bin
inttypes
kbin
libgen
locale
lzf
machine armv7-m: Expose section name to allow relocation 2024-01-04 15:07:18 +01:00
misc libs/log2ceil: Move implementation of log2ceil to a common place 2023-12-14 08:46:12 -08:00
modlib riscv/arch_elf.c: Handle PCREL_HI20/LO12_I/S relocations correctly 2023-12-12 17:32:36 -08:00
net
netdb
obstack compiler/tasking: fix compiler warning on tasking 2024-01-31 05:02:56 -08:00
pthread sched/tls_info: Add tl_ prefix to pthread cleanup stack / tos 2023-11-15 08:52:04 -08:00
pwd
queue
regex
sched task/pthread_cancelpt: Move cancel point handling to libc, data to TLS 2023-11-15 08:52:04 -08:00
semaphore sched/semaphore: Move named semaphores to user space 2023-11-27 04:52:54 -08:00
signal
spawn
stdio compiler/tasking: fix unreachable code on tasking toolchain 2024-01-30 20:53:00 -08:00
stdlib
stream libc/stream: add file out stream 2023-12-25 16:54:16 -03:00
string compiler/tasking: fix unreachable code on tasking toolchain 2024-01-30 20:53:00 -08:00
symtab libs: fix the problem that the address obtained in thumb mode cannot be executed. 2024-01-04 09:22:57 -08:00
syslog
termios
time
tls task/pthread_cancelpt: Fix task_delete from another task group 2023-11-22 08:05:58 -08:00
uio
unistd compiler/tasking: fix unreachable code on tasking toolchain 2024-01-30 20:53:00 -08:00
userfs
uuid
wchar
wctype compiler/tasking: fix unreachable code on tasking toolchain 2024-01-30 20:53:00 -08:00
wqueue semaphore/_SEM_XX: Remove the _SEM redirection macros as unnecessary 2023-11-27 04:52:54 -08:00
zoneinfo
.gitignore
CMakeLists.txt
Kconfig
libc.csv libc.csv: Fix qsort signature with unexpected quotation mark 2024-01-14 02:17:22 -08:00
libc.h
Makefile