Okay, I found and played with RobotDyn Mega 2560 PRO (Embed) /
Atmega2560-16AU chip [1], it has onboard CH340 for flashing that works
with avrdude, just additional UART2USB board is required, using as
Arduino-Mega2560, builds fine, flashes fine, runs fine so far with
only bare nsh no commands no ostest, will add board and ostest config
if that fits in 8K RAM :-)

Also need to review config because that bare nsh shouold not use 71KB
of flash :-)

avr-gcc (GCC) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% /usr/bin/time -h ./tools/configure.sh -B arduino-mega2560:nsh
% gmake CROSSDEV=avr-
(..)
Memory region         Used Size  Region Size  %age Used
           flash:       71642 B       256 KB     27.33%
            sram:        2718 B         8 KB     33.18%
          eeprom:           0 B         4 KB      0.00%
        2,06s real              17,83s user             7,04s sys

[1] https://robotdyn.com/mega-2560-pro-embed-ch340g-atmega2560-16au

% avrdude -v -V -p atmega2560 -c wiring -P /dev/cuaU0 -D -U flash:w:nuttx.elf:e
Avrdude version 8.2
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

System wide configuration file is /usr/local/etc/avrdude.conf
User configuration file is /home/XXX/.avrduderc
Warning: programmer xplainedmini_twi fails to specify prog_modes =
PM_...; [/usr/home/XXX/.avrduderc:357]

Using port            : /dev/cuaU0
Using programmer      : wiring
AVR part              : ATmega2560
Programming modes     : SPM, ISP, HVPP, JTAG
Programmer type       : Wiring
Description           : Wiring bootloader using STK500 v2 protocol
Programmer model      : AVRISP
HW version            : 15
FW version controller : 2.10
SCK period            : 0.1 us

AVR device initialized and ready to accept instructions
Device signature = 1E 98 01 (ATmega2560)
Reading 71642 bytes for flash from input file nuttx.elf
in 1 section [0, 0x117d9]: 280 pages and 38 pad bytes
Writing 71642 bytes to flash
Writing | ################################################## | 100% 22.19s
71642 bytes of flash written
Avrdude done.  Thank you.

% cu -l /dev/cuaU1 -s 38400
Connected
NuttShell (NSH) NuttX-13.1.0
nsh> uname -a
nsh: uname: command not found
nsh> help
help usage:  help [-v] [<cmd>]

    ?       help
nsh>

:-)

--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info

Reply via email to