README: add how-to-build-on-windows instructions

Signed-off-by: Aubin Constans <aubin.constans@microchip.com>
This commit is contained in:
Aubin Constans
2019-03-19 19:14:44 +01:00
committed by Eugen Hristev
parent dc50197826
commit bdff65c234

View File

@@ -7,7 +7,74 @@ main application from specified boot media: NAND FLASH, serial FLASH (both
AT25-compatible of DataFlash), serial EEPROM, SD Card, etc. to main memory and
to start it.
1 GNU ARM Toolchain
1 Host Setup
================================================================================
## 1.1 Linux Host Requirements
Refer to the GNU ARM Toolchain section below for toolchain recommendations.
## 1.2 Windows Host Setup
### 1.2.1 Install required tools
A toolchain such as GNU Tools for Arm Embedded Processors shall be provided.
Get one from e.g. <https://developer.arm.com/open-source/gnu-toolchain/gnu-rm>.
Run the installation wizard and specify a destination folder whose full path is
free from any whitespace.
Further instructions below are written as if the toolchain had been installed
to C:\opt\gnu_tools_arm\7-2018-q2.
Building AT91Bootstrap requires a POSIX environment. Several tools are available
on the market to provide such an environment. In these instructions we rely on
Minimal SYStem 2 (MSYS2).
Get MSYS2 from <http://www.msys2.org>.
Install it. The installation wizard ask for the installation folder, and
suggests to keep its full path short.
Further instructions below are written as if MSYS2 had been installed to
C:\opt\msys.
MSYS2 notably provides a minimal Bourne Shell, named mintty.
Launch mintty in the "MSYS2 MSYS" configuration: either search for the
"MSYS2 MSYS" shortcut in the Program menu, or invoke the Run dialog
('Windows' and 'R' key combination) and enter the following command at the Open
prompt:
C:\opt\msys\msys2_shell.cmd -msys
In this terminal, whose prompt is suffixed with "MSYS", request the package
manager to update both its database and the packages already installed:
$ pacman -Syuu
Still at the "MSYS" prompt, install additional packages that we will need later
on when building AT91Bootstrap:
$ pacman -S bc gawk gcc git make python2 tar
$ cd /usr/bin
$ ln -s python2.exe python.exe && ln -s python2-config python-config
Finally, close the "MSYS2 MSYS" terminal window.
### 1.2.2 Open a shell suitable for building AT91Bootstrap
Launch mintty in the "MSYS2 MinGW 64-bit" configuration: either search for the
"MSYS2 MinGW 64-bit" shortcut in the Program menu, or invoke the Run dialog
('Windows' and 'R' key combination) and enter the following command at the Open
prompt:
C:\opt\msys\msys2_shell.cmd -mingw64
In this terminal, whose prompt is suffixed with "MINGW64", configure environment
variables:
$ export CROSS_COMPILE="arm-none-eabi-"
$ export PATH=/c/opt/gnu_tools_arm/7-2018-q2/bin:$PATH
Still at the "MINGW64" prompt, proceed with instructions given in the Compile
AT91Bootstrap section below.
2 GNU ARM Toolchain
================================================================================
AT91Bootstrap has been compiled and tested under Linux using the following GNU
@@ -25,14 +92,14 @@ ARM Toolchain:
WARNING: check KNOWN_ISSUES for issues with older gcc versions. We recommend
using a toolchain newer than 6.0.
2 Compile AT91Bootstrap
3 Compile AT91Bootstrap
================================================================================
## 2.1 Compile DataFlashBoot
## 3.1 Compile DataFlashBoot
Let's use at91sam9x5ek as an example.
### 2.1.1 Compile booting u-boot image from DataFlash
### 3.1.1 Compile booting u-boot image from DataFlash
$ cd <project directory>
$ make mrproper
@@ -42,7 +109,7 @@ Let's use at91sam9x5ek as an example.
If the building process is successful, the final .bin image can be found under
binaries/
### 2.1.2 Compile booting kernel image from DataFlash
### 3.1.2 Compile booting kernel image from DataFlash
$ cd <project directory>
$ make mrproper
@@ -52,7 +119,7 @@ binaries/
If the building process is successful, the final .bin image can be found under
binaries/
### 2.1.3 Compile booting kernel & dt image from DataFlash
### 3.1.3 Compile booting kernel & dt image from DataFlash
$ cd <project directory>
$ make mrproper
@@ -62,11 +129,11 @@ binaries/
If the building process is successful, the final .bin image can be found under
binaries/
## 2.2 Compile NandFlashBoot
## 3.2 Compile NandFlashBoot
Let's use at91sam9m10g45ek as an example.
### 2.2.1 Compile booting u-boot image from NandFlash
### 3.2.1 Compile booting u-boot image from NandFlash
$ cd <project directory>
$ make mrproper
@@ -76,7 +143,7 @@ Let's use at91sam9m10g45ek as an example.
If the building process is successful, the final .bin image can be found under
binaries/
### 2.2.2 Compile booting kernel image from NandFlash
### 3.2.2 Compile booting kernel image from NandFlash
$ cd <project directory>
$ make mrproper
@@ -86,7 +153,7 @@ binaries/
If the building process is successful, the final .bin image can be found under
binaries/
### 2.2.3 Compile booting kernel & dt image from NandFlash
### 3.2.3 Compile booting kernel & dt image from NandFlash
$ cd <project directory>
$ make mrproper
@@ -96,11 +163,11 @@ binaries/
If the building process is successful, the final .bin image can be found under
binaries/
## 2.3 Compile SDCardBoot
## 3.3 Compile SDCardBoot
Let's use at91sam9m10g45ek as an example,
### 2.3.1 Compile booting u-boot image from SDCard
### 3.3.1 Compile booting u-boot image from SDCard
$ cd <project directory>
$ make mrproper
@@ -110,7 +177,7 @@ Let's use at91sam9m10g45ek as an example,
If the building process is successful, the final .bin image can be found under
binaries/
### 2.3.2 Compile booting linux image from SDCard
### 3.3.2 Compile booting linux image from SDCard
$ cd <project directory>
$ make mrproper
@@ -120,7 +187,7 @@ binaries/
If the building process is successful, the final .bin image can be found under
binaries/
### 2.3.3 Compile booting linux & dt image from SDCard
### 3.3.3 Compile booting linux & dt image from SDCard
$ cd <project directory>
$ make mrproper
@@ -130,7 +197,7 @@ binaries/
If the building process is successful, the final .bin image can be found under
binaries/
3 Release
4 Release
================================================================================
If you plan to release the project, you can use the command as below
@@ -140,17 +207,17 @@ If you plan to release the project, you can use the command as below
If the command is successful, the .tar.gz tar package can be found under
the project top directory.
4 Others
5 Others
================================================================================
## 4.1 About booting from NOR flash.
## 5.1 About booting from NOR flash.
### 4.1.1 ROM Code version
### 5.1.1 ROM Code version
Booting from the external NOR flash is supported in ROM code v2.1
for SAMA5D3x. Bootstrap relocates the binary to the internal SRAM and run.
### 4.1.2 SAM-BA
### 5.1.2 SAM-BA
Using SAM-BA to program the binary to the NOR flash is a little different
from other booting mode. Namely, there is no 'Send Boot File' command for
@@ -159,7 +226,7 @@ NOR flash.
You should use 'Send File' command to send the binary file the same like
for a normal file, with 'Address' selected to 0.
5 Contributing your own board
6 Contributing your own board
================================================================================
If the system board that you have is not listed, then you will need
@@ -179,7 +246,7 @@ steps:
7\. Type "make", and you should get the final .bin image can be found under
the binaries/ directory.
6 Contributing
7 Contributing
================================================================================
To contribute to AT91Bootstrap you should submit the patches for review to