This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 170a86c4a51776fbc1e4693f9051e102c075da67 Author: Matteo Golin <matteo.go...@gmail.com> AuthorDate: Fri May 30 23:32:00 2025 -0400 docs/avr: Re-structure documentation Re-structure the AVR documentation to have pages for the chip families, and their own board listings. --- .../atmega/{ => atmega128}/boards/amber/README.txt | 0 .../atmega/{ => atmega128}/boards/amber/index.rst | 0 .../platforms/avr/atmega/atmega128/index.rst | 16 ++++ .../boards/mega1284p-xplained/board.jpg | Bin .../boards/mega1284p-xplained/index.rst | 0 .../boards/moteino-mega/README.txt | 0 .../platforms/avr/atmega/atmega1284p/index.rst | 30 ++++++++ .../boards/arduino-mega2560/README.txt | 0 .../boards/elegoo-mega2560r3/elegoo-mega2560r3.jpg | Bin .../boards/elegoo-mega2560r3/index.rst | 0 .../platforms/avr/atmega/atmega2560/index.rst | 72 ++++++++++++++++++ Documentation/platforms/avr/atmega/index.rst | 81 +++------------------ 12 files changed, 129 insertions(+), 70 deletions(-) diff --git a/Documentation/platforms/avr/atmega/boards/amber/README.txt b/Documentation/platforms/avr/atmega/atmega128/boards/amber/README.txt similarity index 100% rename from Documentation/platforms/avr/atmega/boards/amber/README.txt rename to Documentation/platforms/avr/atmega/atmega128/boards/amber/README.txt diff --git a/Documentation/platforms/avr/atmega/boards/amber/index.rst b/Documentation/platforms/avr/atmega/atmega128/boards/amber/index.rst similarity index 100% rename from Documentation/platforms/avr/atmega/boards/amber/index.rst rename to Documentation/platforms/avr/atmega/atmega128/boards/amber/index.rst diff --git a/Documentation/platforms/avr/atmega/atmega128/index.rst b/Documentation/platforms/avr/atmega/atmega128/index.rst new file mode 100644 index 0000000000..2a622f22bf --- /dev/null +++ b/Documentation/platforms/avr/atmega/atmega128/index.rst @@ -0,0 +1,16 @@ +========= +ATMega128 +========= + +This port of NuttX to the Amber Web Server from +`SoC Robotics <http://www.soc-robotics.com/index.htm>`__ is partially +completed. The Amber Web Server is based on an Microchip ATMega128. + +Supported Boards +---------------- + +.. toctree:: + :glob: + :maxdepth: 1 + + boards/*/* diff --git a/Documentation/platforms/avr/atmega/boards/mega1284p-xplained/board.jpg b/Documentation/platforms/avr/atmega/atmega1284p/boards/mega1284p-xplained/board.jpg similarity index 100% rename from Documentation/platforms/avr/atmega/boards/mega1284p-xplained/board.jpg rename to Documentation/platforms/avr/atmega/atmega1284p/boards/mega1284p-xplained/board.jpg diff --git a/Documentation/platforms/avr/atmega/boards/mega1284p-xplained/index.rst b/Documentation/platforms/avr/atmega/atmega1284p/boards/mega1284p-xplained/index.rst similarity index 100% rename from Documentation/platforms/avr/atmega/boards/mega1284p-xplained/index.rst rename to Documentation/platforms/avr/atmega/atmega1284p/boards/mega1284p-xplained/index.rst diff --git a/Documentation/platforms/avr/atmega/boards/moteino-mega/README.txt b/Documentation/platforms/avr/atmega/atmega1284p/boards/moteino-mega/README.txt similarity index 100% rename from Documentation/platforms/avr/atmega/boards/moteino-mega/README.txt rename to Documentation/platforms/avr/atmega/atmega1284p/boards/moteino-mega/README.txt diff --git a/Documentation/platforms/avr/atmega/atmega1284p/index.rst b/Documentation/platforms/avr/atmega/atmega1284p/index.rst new file mode 100644 index 0000000000..9ec197d295 --- /dev/null +++ b/Documentation/platforms/avr/atmega/atmega1284p/index.rst @@ -0,0 +1,30 @@ +=========== +Atmega1284P +=========== + +The Atmega1284P is a chip from Microchip ("inherited" from Atmel) with the +following features: + +* 16MHz 8bit AVR RISC Processor +* 128Kbyte Flash +* 16Kbyte RAM +* 4Kbyte EEPROM +* 2 High Speed Serial Ports +* 2 8-bit Timer/Counters +* 2 16-bit Timer/Counter +* 1 Master/Slave SPI +* 1 I2C controller (aka Two-Wire interface) +* 8Ch 10bit Analog Input port +* up to 32 GPIOs +* Watchdog timer +* Real Time Clock +* JTAG/OCD Interface + +Supported Boards +---------------- + +.. toctree:: + :glob: + :maxdepth: 1 + + boards/*/* diff --git a/Documentation/platforms/avr/atmega/boards/arduino-mega2560/README.txt b/Documentation/platforms/avr/atmega/atmega2560/boards/arduino-mega2560/README.txt similarity index 100% rename from Documentation/platforms/avr/atmega/boards/arduino-mega2560/README.txt rename to Documentation/platforms/avr/atmega/atmega2560/boards/arduino-mega2560/README.txt diff --git a/Documentation/platforms/avr/atmega/boards/elegoo-mega2560r3/elegoo-mega2560r3.jpg b/Documentation/platforms/avr/atmega/atmega2560/boards/elegoo-mega2560r3/elegoo-mega2560r3.jpg similarity index 100% rename from Documentation/platforms/avr/atmega/boards/elegoo-mega2560r3/elegoo-mega2560r3.jpg rename to Documentation/platforms/avr/atmega/atmega2560/boards/elegoo-mega2560r3/elegoo-mega2560r3.jpg diff --git a/Documentation/platforms/avr/atmega/boards/elegoo-mega2560r3/index.rst b/Documentation/platforms/avr/atmega/atmega2560/boards/elegoo-mega2560r3/index.rst similarity index 100% rename from Documentation/platforms/avr/atmega/boards/elegoo-mega2560r3/index.rst rename to Documentation/platforms/avr/atmega/atmega2560/boards/elegoo-mega2560r3/index.rst diff --git a/Documentation/platforms/avr/atmega/atmega2560/index.rst b/Documentation/platforms/avr/atmega/atmega2560/index.rst new file mode 100644 index 0000000000..9220edbe9b --- /dev/null +++ b/Documentation/platforms/avr/atmega/atmega2560/index.rst @@ -0,0 +1,72 @@ +============== +AVR ATMega2560 +============== + +Extension of the AVR architecture to support the ATMega2560 and specific support +for the Arduino Mega2560 board were contributed by Dimitry Kloper and first +released in NuttX-7.14. + +Peripheral Support +------------------ + +The following list indicates peripherals supported in NuttX: + +========== ======= ===== +Peripheral Support Notes +========== ======= ===== +GPIO Yes +PWM No +ADC No +RTC No +WTD No +I2C No +UART Yes +SPI No +TIMER Yes +UART Yes +========== ======= ===== + +---- +UART +---- + +UART is implemented using interrupts. The chip doesn't support DMA. + +----- +Timer +----- + +The timer peripheral is exposed as standard timer. + +Flashing the Device +------------------- + +ATMega boards may vary in how to flash the device, but a common way to do so is +by using the ``avrdude`` utility. + +The ``avrdude`` utility allows you to select the device being flashed with the +``-p`` flag. In the case of the ATMega2560, you will need to supply ``-p +m2560``. + +You can also select which type of programmer you want to flash the device using. +There are a lot of options, which can be listed using ``avrdude -c ?``. A common +programmer is ``stk500v2``, which is often built into Arduino boards and allows +you to flash the device with a serial connection. You'll need to specify the +port on your computer that the programmer/device is connected to with ``-P``, +such as ``-P /dev/ttyACM0``. + +Here is an example command for flashing the ``nuttx.hex`` image to the +:doc:`boards/arduino-mega2560/index`: + +.. code:: console + + $ avrdude -c stk500v2 -p m2560 -P /dev/ttyACM0 -U flash:w:nuttx.hex -v -D + +Supported Boards +---------------- + +.. toctree:: + :glob: + :maxdepth: 1 + + boards/*/* diff --git a/Documentation/platforms/avr/atmega/index.rst b/Documentation/platforms/avr/atmega/index.rst index f9518c9115..9aa7554adf 100644 --- a/Documentation/platforms/avr/atmega/index.rst +++ b/Documentation/platforms/avr/atmega/index.rst @@ -2,82 +2,23 @@ Microchip Atmega ================ -ATMega128 ---------- +.. tags:: chip:atmega, arch:avr, vendor:microchip -This port of NuttX to the Amber Web Server from -`SoC Robotics <http://www.soc-robotics.com/index.htm>`__ is partially -completed. The Amber Web Server is based on an Microchip ATMega128. +ATMega chips share some common NuttX code in their implementations. -Atmega1284P ------------ +Build Toolchain +--------------- -The Atmega1284P is a chip from Microchip ("inherited" from Atmel) with the -following features: +.. todo:: - - 16MHz 8bit AVR RISC Processor - - 128Kbyte Flash - - 16Kbyte RAM - - 4Kbyte EEPROM - - 2 High Speed Serial Ports - - 2 8-bit Timer/Counters - - 2 16-bit Timer/Counter - - 1 Master/Slave SPI - - 1 I2C controller (aka Two-Wire interface) - - 8Ch 10bit Analog Input port - - up to 32 GPIOs - - Watchdog timer - - Real Time Clock - - JTAG/OCD Interface + Some common information about installing the necessary tool chains for these boards. -AVR ATMega2560 --------------- - -Extension of the AVR architecture to support the -ATMega2560 and specific support for the Arduion MEGA2560 board were -contributed by Dimitry Kloper and first released in NuttX-7.14. - - -Clock Configuration -=================== - -System Timer -============ - -Peripheral Support -================== - -The following list indicates peripherals supported in NuttX: - -========== ======= ===== -Peripheral Support Notes -========== ======= ===== -GPIO Yes -PWM No -ADC No -RTC No -WTD No -I2C No -SPI No -TIMER Yes -UART Yes -========== ======= ===== - -UART ----- - -UART is implemented using interrupts. The chip doesn't support DMA. - -TIMER ------ - -The TIMER peripheral is exposed as standard timer. - -Supported Boards -================ +Supported Chips +--------------- .. toctree:: - :glob: :maxdepth: 1 - boards/*/* + atmega128/index.rst + atmega1284p/index.rst + atmega2560/index.rst