Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
resources:tools-software:sharc-audio-module:micropython:running [27 Feb 2019 18:48] – created Wenting Zhangresources:tools-software:sharc-audio-module:micropython:running [24 Jul 2019 22:21] (current) – Remove extra `` in the commnad provided Wenting Zhang
Line 1: Line 1:
-====== Tutorial: Running MicroPython on the board ======+====== Tutorial: Running MicroPython on the SHARC Audio Module Main Board ======
  
 The fastest way of getting MicroPython to run on the board, is by flashing a pre-built MicroPython loader binary into the on-board SPI Flash and run the MicroPython from there. The fastest way of getting MicroPython to run on the board, is by flashing a pre-built MicroPython loader binary into the on-board SPI Flash and run the MicroPython from there.
  
 <WRAP round 70% Important> <WRAP round 70% Important>
-This would overwrite anything that is previously stored in the SPI Flash, for example, U-Boot. If you only want to run the MicroPython in the RAM without erasing the Flash, refer to the tutorial about building the MicroPython using CCES. You may use the debug function of the CCES to run the MicroPython from RAM.+This would overwrite anything that is previously stored in the SPI Flash. If you only want to run MicroPython in RAM without erasing the Flash, refer to [[resources:tools-software:sharc-audio-module:micropython:building|Tutorial: Building MicroPython with CrossCore Embedded Stuidio]]. You may use the debug function of CrossCore Embedded Studio to run MicroPython from RAM.
 </WRAP> </WRAP>
  
Line 13: Line 13:
 [[https://github.com/analogdevicesinc/micropython/releases]] [[https://github.com/analogdevicesinc/micropython/releases]]
  
-===== Flash it into the SAM board =====+===== Flash it into the SHARC Audio Module =====
  
-There are various ways of doing this. Here I am using the CLDP (Command Line Downloader Program) bundled with the CCES and the Bare Metal SDK.+There are various ways of doing this. Here I am using the CLDP (Command Line Device Programmer) bundled with the CrossCore Embedded Studio and the Bare Metal SDK.
  
   - Download the binary loader file (micropython-xxxxxx.ldr, xxxxxx is the build date).   - Download the binary loader file (micropython-xxxxxx.ldr, xxxxxx is the build date).
   - Open up a Command Prompt window and navigate to the directory where you put the loader file. (By using ''dir'' you should be able to see the loader file in the current directory.)   - Open up a Command Prompt window and navigate to the directory where you put the loader file. (By using ''dir'' you should be able to see the loader file in the current directory.)
-  - Connect power supply and the ICE-1000 to the board. Connect the ICE-1000 to your PC.+  - Connect power supply and the ICE-1000 to the main board. Connect the ICE-1000 to your PC using the USB cable that ships with the ICE-1000.
   - Use the following command to flash it into the board (assuming you have CCES 2.8.1, Bare Metal SDK 2.0.0, and the board is connected to PC via a ICE-1000, and MicroPython built on Feb 27, 2019): <code>   - Use the following command to flash it into the board (assuming you have CCES 2.8.1, Bare Metal SDK 2.0.0, and the board is connected to PC via a ICE-1000, and MicroPython built on Feb 27, 2019): <code>
-"C:\Analog Devices\CrossCore Embedded Studio 2.8.1\cldp.exe" -verbose -proc ADSP-SC589 -core 1 -emu 1000 -driver "C:\Analog Devices\SAM_BareMetal_SDK-Rel2.0.0\extras\flash-programmer\Supporting_Files\w25ql512fv_dpia_SC589_SHARC_Core1.dxe" -cmd prog -erase affected -format bin -file micropython-190227.ldr''+"C:\Analog Devices\CrossCore Embedded Studio 2.8.1\cldp.exe" -verbose -proc ADSP-SC589 -core 1 -emu 1000 -driver "C:\Analog Devices\SAM_BareMetal_SDK-Rel2.0.0\extras\flash-programmer\Supporting_Files\w25ql512fv_dpia_SC589_SHARC_Core1.dxe" -cmd prog -erase affected -format bin -file micropython-190227.ldr
 </code> </code>
   - You should see something similar to this, and saying ''done'' in the end. If not, double check and make sure the micropython binary is in the current directory, the path for CCES and Bare Metal SDK are correct. <code>Target          Emulation Debug Target   - You should see something similar to this, and saying ''done'' in the end. If not, double check and make sure the micropython binary is in the current directory, the path for CCES and Bare Metal SDK are correct. <code>Target          Emulation Debug Target
Line 33: Line 33:
 ===== Connect to the board ===== ===== Connect to the board =====
  
-Now the MicroPython has been flashed into the board, follow the following step to connect to the board:+Now MicroPython has been flashed into the board, follow these steps to connect to the board:
  
-  - Connect the provided FTDI USB-serial cable to the board, and plug the USB into PC. +  - Connect an FTDI USB-serial cable to the board, and plug the USB into the PC. 
-  - You should be able to see a USB Serial Port device in the Device Manager, note that COM number. +  - You should be able to see a USB Serial Port device in the Device Manager, note the COM number. 
-  - Open up a serial terminal emulator, connect to that COM port, use baud rate 115200. I am using PuTTY, but you may use other terminal emulator as well+  - Open up a serial terminal emulator such as PuTTY, connect to the COM port in the step above, use baud rate 115200. 
-  - Set the JP1 on the board to 1-2 (SPI Boot)+  - Set JP1 on the board to 1-2 connected (SPI Boot)
   - Press the RESET button (SW2)   - Press the RESET button (SW2)
-  - You should be able to see the Python console.+  - You should be able to see the Python console in the terminal window.
  
 {{:resources:tools-software:sharc-audio-module:micropython:mpy.png?nolink|}} {{:resources:tools-software:sharc-audio-module:micropython:mpy.png?nolink|}}
  
 +----
 +{{navigation SHARC Audio Module#..faust|Faust and the SHARC Audio Module#..micropython|MicroPython Overview#.peripherals|Using Hardware Peripherals}}
resources/tools-software/sharc-audio-module/micropython/running.1551289738.txt.gz · Last modified: 27 Feb 2019 18:48 by Wenting Zhang