You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "ramangopalan (via GitHub)" <gi...@apache.org> on 2024/02/07 09:40:00 UTC
[PR] avr32dev1: Fix compilation and nsh boot-up [nuttx]
ramangopalan opened a new pull request, #11668:
URL: https://github.com/apache/nuttx/pull/11668
Dear NuttX community, Greetings!
## Summary
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).
## Impact
This PR won't affect any other build. The -fno-lto flag will apply to
all other targets but not avr32dev1 (OR other avr32 targets).
Otherwise, this PR only touches files specific to avr32dev1.
## Testing
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.
In addition, the PR fixes silly compilation problems with avr32dev1.
Please let me know if these are fine OR if there's something I have
missed.
References:
[1]: https://github.com/ramangopalan/nuttx_avr32dev1
[2]: https://github.com/ramangopalan/avr32-gnu-toolchain-linux_x86_64
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] avr32dev1: Fix compilation and nsh boot-up [nuttx]
Posted by "ramangopalan (via GitHub)" <gi...@apache.org>.
ramangopalan commented on PR #11668:
URL: https://github.com/apache/nuttx/pull/11668#issuecomment-1933401912
Dear @xiaoxiang781216, I have squashed the second commit into the main one. Please let me know if there's anything else I can help with. Thank you.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] avr32dev1: Fix compilation and nsh boot-up [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #11668:
URL: https://github.com/apache/nuttx/pull/11668#discussion_r1481324503
##########
libs/libc/assert/Make.defs:
##########
@@ -24,8 +24,13 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
CSRCS += lib_stackchk.c
endif
+# avr32-gcc (4.4.7) doesn't understand -fno-lto.
+# Please make an exception in this case.
+
+ifeq ($(CONFIG_ARCH_CHIP_AT32UC3),n)
Review Comment:
let's check CONFIG_LTO_NONE instead
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] avr32dev1: Fix compilation and nsh boot-up [nuttx]
Posted by "ramangopalan (via GitHub)" <gi...@apache.org>.
ramangopalan commented on code in PR #11668:
URL: https://github.com/apache/nuttx/pull/11668#discussion_r1481342726
##########
libs/libc/assert/Make.defs:
##########
@@ -24,8 +24,13 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
CSRCS += lib_stackchk.c
endif
+# avr32-gcc (4.4.7) doesn't understand -fno-lto.
+# Please make an exception in this case.
+
+ifeq ($(CONFIG_ARCH_CHIP_AT32UC3),n)
Review Comment:
Many thanks for your message. I have implemented your suggestion. The compilation on avr32dev1 is fine. Can you please check if it is OK?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] avr32dev1: Fix compilation and nsh boot-up [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #11668:
URL: https://github.com/apache/nuttx/pull/11668#issuecomment-1931917004
@ramangopalan please squash your change into one patch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] avr32dev1: Fix compilation and nsh boot-up [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis merged PR #11668:
URL: https://github.com/apache/nuttx/pull/11668
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org