summaryrefslogtreecommitdiff
path: root/nuttx/configs/pcblogic-pic32mx/README.txt
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-05-22 21:10:51 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-05-22 21:10:51 +0000
commit69babf5fd1b826777f011217cd1b32f12015e807 (patch)
treed00c4dd5d08eff634dcdb5398cb957022b0f673a /nuttx/configs/pcblogic-pic32mx/README.txt
parent4398827512c7ac58e962ca2495b0b96bf30dbabe (diff)
downloadpx4-nuttx-69babf5fd1b826777f011217cd1b32f12015e807.tar.gz
px4-nuttx-69babf5fd1b826777f011217cd1b32f12015e807.tar.bz2
px4-nuttx-69babf5fd1b826777f011217cd1b32f12015e807.zip
Add a tool to create proper nuttx.hex files for PICkit2
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3640 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/pcblogic-pic32mx/README.txt')
-rw-r--r--nuttx/configs/pcblogic-pic32mx/README.txt49
1 files changed, 49 insertions, 0 deletions
diff --git a/nuttx/configs/pcblogic-pic32mx/README.txt b/nuttx/configs/pcblogic-pic32mx/README.txt
index b6a4d54da..c28737c83 100644
--- a/nuttx/configs/pcblogic-pic32mx/README.txt
+++ b/nuttx/configs/pcblogic-pic32mx/README.txt
@@ -12,6 +12,7 @@ Contents
PIC32MX460F512L Pin Out
MAX3232 Connection
Toolchains
+ Loading NuttX with PICkit2
PIC32MX Configuration Options
Configurations
@@ -212,6 +213,54 @@ Toolchains
If you have problems with the dependency build (for example, if you are not
building on C:), then you may need to modify tools/mkdeps.sh
+Loading NuttX with PICkit2
+==========================
+
+ Intel Hex Forma Files:
+ ----------------------
+
+ When NuttX is built it will produce two files in the top-level NuttX
+ directory:
+
+ 1) nuttx - This is an ELF file, and
+ 2) nuttx.ihx - This is an Intel Hex format file. This is controlled by
+ the setting CONFIG_INTELHEX_BINARY in the .config file.
+
+ The PICkit tool wants an Intel Hex format file to burn into FLASH.
+ However, there are two problems with the generated nutt.ihx:
+
+ 1) The tool expects Intel Hex format files to be named *.hex. This
+ is not a significant issue. However, just renaming the file to
+ nuttx.hex is *not* sufficient. There is another problem:
+ 2) The tool expects the nuttx.hex file to contain physical addresses.
+ But the nuttx.ihx file generated from the top-level make will have
+ address in the KSEG0 and KSEG1 regions.
+
+ tools/mkpichex:
+ ---------------
+
+ There is a simple tool in the configs/pcblogic-pic32mx/tools directory
+ that can be used to solve both issues with the nuttx.ihx file. But,
+ first, you must build the the tools:
+
+ cd configs/pcblogic-pic32mx/tools
+ make
+
+ Now you will have an excecutable file call mkpichex (or mkpichex.exe on
+ Cygwin). This program will take the nutt.ihx file as an input, it will
+ convert all of the KSEG0 and KSEG1 addresses to physical address, and
+ it will write the modified file as nuttx.hex.
+
+ To use this file, you need to do the following things:
+
+ . ./setenv.sh # Source setenv.sh. Among other this, this script
+ # will add configs/pcblogic-pic32mx/tools to your
+ # PATH variable
+ make # Build nuttx and nuttx.ihx
+ mkpichex $PWD # Convert nuttx.ihx to nuttx.hex. $PWD is the path
+ # to the top-level build directory. It is the only
+ # required input to mkpichex.
+
PIC32MX Configuration Options
=============================