Remove NXPPROG from provided upload methods (too specialized).

pull/15339/head
Jamie Smith 2021-01-27 19:56:09 -08:00 committed by Jay Sridharan
parent d1a8396478
commit 3182f41974
4 changed files with 0 additions and 1492 deletions

View File

@ -46,16 +46,6 @@ if(OPENOCD_UPLOAD_ENABLED)
)
endif()
# Config options for NXPPROG
# -------------------------------------------------------------
set(NXPPROG_UPLOAD_ENABLED FALSE)
if(NXPPROG_UPLOAD_ENABLED)
set(NXPPROG_OSCFREQ 14748)
set(NXPPROG_BAUD 115200)
endif()
# Config options for STM32Cube
# -------------------------------------------------------------

View File

@ -18,7 +18,6 @@ To debug, first run `make gdbserver` in one terminal to start up the debug probe
|J-Link|`-DUPLOAD_METHOD=JLINK`|✔️|✔️|Fast|Mbed boards with J-Link On-Board. Custom boards with a J-Link probe.
|pyOCD|`-DUPLOAD_METHOD=PYOCD`|✔️|✔️|Medium|Almost all Mbed boards. Custom boards with an ST-Link or DAPLink probe.
|OpenOCD|`-DUPLOAD_METHOD=OPENOCD`|✔️|✔️|(Varies)|A number of different debug probes, but requires configuration.
|NXP Bootloader|`-DUPLOAD_METHOD=NXPPROG`|✔️|❌|Slow|LPC1768 and LPC1114 on custom boards.
|STM32Cube|`-DUPLOAD_METHOD=STM32CUBE`|✔️|✔️|Fast|All STMicroelectronics Mbed boards, custom boards with ST_Link probes.
@ -136,42 +135,6 @@ Whether the OpenOCD upload method can be activated.
This config option specifies all OpenOCD commands needed to configure the program for your target processor. At minimum, this should include loading an interface config file and a target config file. Since these options may need to access scripts in the OpenOCD install dir, CMake provides the variable `OpenOCD_SCRIPT_DIR` which will resolve to the scripts directory of OpenOCD on the current machine.
## NXP Bootloader
Uploader that uses the bootloader on certain NXP LPC1XXX and LPC2XXX processors to flash code. USCRPL's fork of nxpprog.py is used to do the upload so programming from Windows 10 using FTDI adapters should work fine.
Using this uploader requires some special considerations in your hardware design: Unless you want to manually reset the CPU each time you upload code, the processor's ISP and reset pins must be connected to the serial port. Specifically, a low on the processor reset pin should be triggered by a high on DTR, and a low on the processor ISP pin should be triggered by a high on RTS.
To use this uploader, you will need to have the `serial` package installed into the Python installation that CMake is using.
### Parameters:
> NXPPROG_UPLOAD_ENABLED
**Type:** Bool
Whether the NXP Bootloader upload method can be activated.
> NXPPROG_BAUD
**Type:** Integer
Baudrate to talk to the bootloader over.
> NXPPROG_OSCFREQ
**Type:** Integer
The bootloader needs to be sent the chip's internal oscillator frequency in order to operate. See your chip's datasheet section on the bootloader for details.
### Options:
> NXPPROG_COM_PORT
**Type:** Integer
Serial port that the NXP processor is accessible on.
## STM32Cube
This uploader uses STMicroelectronics' official upload and debugging tools for its ST-LINK programmers. The upload tool can be obtained from the standalone [STM32CubeProg package](https://www.st.com/en/development-tools/stm32cubeprog.html), but unfortunately the GDB server is only included in the [STM32Cube IDE](https://www.st.com/en/development-tools/stm32cubeide.html), which includes both programs (and also weighs in pretty large at 2.2GB).

View File

@ -1,46 +0,0 @@
### NXPProg Upload Method
# This method needs the following parameters:
# NXPPROG_BAUD - Baudrate to talk to the bootloader over.
# NXPPROG_OSCFREQ - The chip's internal oscillator frequency, this needs to be sent to the bootloader for it to operate.
# This method creates the following options:
# NXPPROG_COM_PORT - Serial port that the NXP processor is accessible on.
### Check if upload method can be enabled on this machine
# NXPPROG requires pyserial
include(CheckPythonPackage)
check_python_package(serial HAVE_PYSERIAL)
set(UPLOAD_NXPPROG_FOUND ${HAVE_PYSERIAL})
set(UPLOAD_SUPPORTS_DEBUG FALSE)
### Set up options
set(NXPPROG_COM_PORT "" CACHE STRING "COM port for bootloader upload. Should be \"COMXX\" on Windows, and /dev/ttyXX on Linux/Mac")
message(STATUS "COM port for bootloader upload: ${NXPPROG_COM_PORT}")
### Function to generate upload target
# Can only access CMAKE_CURRENT_LIST_DIR outside function
set(NXPPROG_PATH ${CMAKE_CURRENT_LIST_DIR}/nxpprog.py)
function(gen_upload_target TARGET_NAME BIN_FILE)
if("${NXPPROG_COM_PORT}" STREQUAL "")
add_custom_target(flash-${TARGET_NAME}
COMMAND ${CMAKE_COMMAND}
-E echo "ERROR: Cannot flash, no COM_PORT configured!")
else()
add_custom_target(flash-${TARGET_NAME}
COMMENT "Flashing ${TARGET_NAME} through bootloader..."
COMMAND ${Python3_EXECUTABLE} ${NXPPROG_PATH}
--control
--oscfreq=${NXPPROG_OSCFREQ}
--baud=${NXPPROG_BAUD}
${NXPPROG_COM_PORT}
${BIN_FILE})
endif()
add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME})
endfunction(gen_upload_target)

File diff suppressed because it is too large Load Diff