From cafb5272629b093a56860d6e6f03cfc2a97e87a7 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 24 Jan 2018 08:52:40 -0600 Subject: [PATCH] configs/flipnclick-sam3x: Using JTAG (vs. Bossac) I was finally able to load code and verify the basic NSH configuration. Updated READMEs. Also switched to USART0 (vs UART0) for the serial console because I was not getting bi-directional communication on the VCOM. --- configs/arduino-due/README.txt | 6 +++ configs/flipnclick-sam3x/README.txt | 70 +++++++++++++++++--------- configs/flipnclick-sam3x/nsh/defconfig | 4 +- configs/freedom-k64f/README.txt | 2 +- configs/freedom-k66f/README.txt | 5 +- 5 files changed, 59 insertions(+), 28 deletions(-) diff --git a/configs/arduino-due/README.txt b/configs/arduino-due/README.txt index bb6d7f08aa..0de6bcb4d2 100644 --- a/configs/arduino-due/README.txt +++ b/configs/arduino-due/README.txt @@ -330,6 +330,12 @@ Serial Consoles Loading Code ============ + [NOTE: I believe that there have been significant changes to the more + recent tool environment such that Bossac may no longer be usable. I + don't know that for certain and perhaps someone with more knowledge of + the tools than I could make this work. See the Flip'n'Clip SAM3X README + file for additional information.] + Installing the Arduino USB Driver under Windows: ------------------------------------------------ diff --git a/configs/flipnclick-sam3x/README.txt b/configs/flipnclick-sam3x/README.txt index 6cbf47b569..8ab7a159a8 100644 --- a/configs/flipnclick-sam3x/README.txt +++ b/configs/flipnclick-sam3x/README.txt @@ -22,23 +22,11 @@ STATUS ====== 2018-01-07: Created the configuration. At present it does not work; I - believe because of tool-related issues. I do the following: - - a) Open TeraTerm, select COM7 at 1200 baud, type a few ENTERs, and - close teraterm. - - b) Execute the following command which claims to have successfully - written to FLASH. - - bossac.exe --info --debug --port COM7 --usb-port=0 --erase --write --verify -b nuttx.bin -R - - But the code does not boot. There is no indication of life. - - c) Repeat a) then - - bossac.exe --info --debug --port COM7 --usb-port=0 --verify -b nuttx.bin - - And it says that the content of the FLASH is not good. + believe because of tool-related issues. See discussion under "Loading + Code" below. + 2018-01-24: I ordered a JTAG connector and soldered that to the Flip'n'Click + and I am now successfully able to load code. The NSH configuration appears + to be fully functional. Buttons and LEDs ================ @@ -99,10 +87,11 @@ Serial Consoles serial chip connected to the first of the MCU (RX0 and TX0 on PA8 and PA9, respectively). The output from that port is visible using the Arduino tool. - Any of UART and USART0-3 may be used as a serial console. By default, - UART0 is used as the serial console in all configurations. But that is - easily changed by modifying the configuration as described under - "Configurations" below. + [NOTE: My experience so far: I get serial output on the virtual COM port + via the UART, but I receive no serial input for keyboard data entered in + the PC serial terminal. I have not investigated this problem. It may + be something as simple as the Rx pin configuration. Instead, I just + switched to USART0.] Other convenient U[S]ARTs that may be used as the Serial console include: @@ -125,9 +114,22 @@ Serial Consoles transceiver to get the signals to RS232 levels (or connect to the USB virtual COM port in the case of UART0). + Any of UART and USART0-3 may be used as a serial console. UART0 would + be the preferred default console setting. However, due to the communication + problems mentioned above, USART0 is used as the default serial console + in all configurations. But that is easily changed by modifying the + configuration as described under "Configurations" below. + Loading Code ============ + [NOTE: This text was mostly copied from the Arduino Due README.txt. I + believe, however, that there have been significant changes to the + tool environment such that Bossac may no longer be usable. I don't + know that for certain and perhaps someone with more knowledge of + the tools than I could make this work. See STATUS below for the + current issues that I see.] + Installing the Arduino USB Driver under Windows ----------------------------------------------- @@ -302,6 +304,25 @@ Loading Code $ bossac.exe --port=COM7 --usb-port=false --boot=1 Set boot flash true + STATUS: + At present this procedure does not work. I do the following: + + a) Open TeraTerm, select COM7 at 1200 baud, type a few ENTERs, and + close teraterm. + + b) Execute the following command which claims to have successfully + written to FLASH. + + bossac.exe --info --debug --port COM7 --usb-port=0 --erase --write --verify -b nuttx.bin -R + + But the code does not boot. There is no indication of life. + + c) Repeat a) then + + bossac.exe --info --debug --port COM7 --usb-port=0 --verify -b nuttx.bin + + And it says that the content of the FLASH is not good. + Uploading NuttX to the Flip&Click Using JTAG -------------------------------------------- @@ -465,15 +486,16 @@ Configurations reconfiguration process. 2. Unless stated otherwise, all configurations generate console - output on UART0 which is available both on the USB virtual COM port - and on the PWML connector (see the section "Serial Consoles" above). + output on USART0 which is available either on the Arduion Shield + connector or on mikroBUS A as described above in the section entitled + "Serial Consoles". 3. Unless otherwise stated, the configurations are setup for Cygwin under Windows: Build Setup: CONFIG_HOST_WINDOWS=y : Microsoft Windows - CONFIG_WINDIWS_CYGWIN=y : Cygwin under Windoes + CONFIG_WINDIWS_CYGWIN=y : Cygwin under Windows 3. All of these configurations are set up to build under Windows using the "GNU Tools for ARM Embedded Processors" that is maintained by ARM diff --git a/configs/flipnclick-sam3x/nsh/defconfig b/configs/flipnclick-sam3x/nsh/defconfig index 79057461ad..f0ba4aedf3 100644 --- a/configs/flipnclick-sam3x/nsh/defconfig +++ b/configs/flipnclick-sam3x/nsh/defconfig @@ -1,4 +1,5 @@ # CONFIG_ARCH_RAMFUNCS is not set +# CONFIG_SAM34_UART0 is not set CONFIG_ARCH_BOARD_FLIPNCLICK_SAM3X=y CONFIG_ARCH_BOARD="flipnclick-sam3x" CONFIG_ARCH_CHIP_ATSAM3X8E=y @@ -33,12 +34,13 @@ CONFIG_RAM_SIZE=65536 CONFIG_RAM_START=0x20000000 CONFIG_RAW_BINARY=y CONFIG_RR_INTERVAL=200 +CONFIG_SAM34_USART0=y CONFIG_SCHED_WAITPID=y CONFIG_SDCLONE_DISABLE=y CONFIG_START_DAY=28 CONFIG_START_MONTH=6 CONFIG_START_YEAR=2013 CONFIG_TASK_NAME_SIZE=0 -CONFIG_UART0_SERIAL_CONSOLE=y +CONFIG_USART0_SERIAL_CONSOLE=y CONFIG_USER_ENTRYPOINT="nsh_main" CONFIG_WDOG_INTRESERVE=0 diff --git a/configs/freedom-k64f/README.txt b/configs/freedom-k64f/README.txt index 5559b2fe5f..a2ce126b7d 100644 --- a/configs/freedom-k64f/README.txt +++ b/configs/freedom-k64f/README.txt @@ -618,7 +618,7 @@ GNU Toolchain Options ===================== The NuttX make system supports several GNU-based toolchains under Linux, - Cygwin under Windows, and Windoes native. To select a toolchain: + Cygwin under Windows, and Windows native. To select a toolchain: 1. Use 'make menuconfig' and select the toolchain that you are using under the System Type menu. diff --git a/configs/freedom-k66f/README.txt b/configs/freedom-k66f/README.txt index 7f5da7cffa..c78a3c4c80 100644 --- a/configs/freedom-k66f/README.txt +++ b/configs/freedom-k66f/README.txt @@ -621,7 +621,7 @@ GNU Toolchain Options ===================== The NuttX make system supports several GNU-based toolchains under Linux, - Cygwin under Windows, and Windoes native. To select a toolchain: + Cygwin under Windows, and Windows native. To select a toolchain: 1. Use 'make menuconfig' and select the toolchain that you are using under the System Type menu. @@ -972,4 +972,5 @@ Status 2017-02-14: nsh: SDHC DMA is not working yet. Buttons and SDIO with automounter is working. netnsh:Is building but Ehternet is not working yet. TX is called but - not IRQ is issued. \ No newline at end of file + not IRQ is issued. +