1
1
2
- PIC24 Bootloader
3
- =================
2
+ PIC24F/32MX Bootloader
3
+ =======================
4
4
5
- This is the PIC24 USB bootloader. It contains firmware and software to
6
- implement a USB bootloader using M-Stack. It differs from the Microchip
5
+ This is the PIC24F/32MX USB bootloader. It contains firmware and software
6
+ to implement a USB bootloader using M-Stack. It differs from the Microchip
7
7
bootloaders in several key ways in both licensing and implementation.
8
8
9
9
License
@@ -12,6 +12,16 @@ Like the rest of M-Stack, this bootloader is free software, and its firmware
12
12
and software are usable under the terms of either the LGPL version 3, or the
13
13
Apache License, version 2.0.
14
14
15
+ The Linker scripts for the PIC24 come from the PIC Linker Script Generator
16
+ (linked below) and have a permissive license. See the file header for the
17
+ included linker scripts.
18
+
19
+ The PIC32 linker scripts are derived from the Linker scripts which are
20
+ distributed with the XC32 toolchain, version 1.40. These linker scripts are
21
+ copyrighted by Microchip and are used under a BSD-style license. See the
22
+ file header on these scripts for details. This is separate from the license
23
+ of M-Stack.
24
+
15
25
Firmware Implementation
16
26
------------------------
17
27
This bootloader's implementation does not use HID, as the Microchip
@@ -20,25 +30,27 @@ difference makes this bootloader faster, and gives it a more robust
20
30
interface, since control transfers can be rejected by the firmware if they
21
31
are not correct.
22
32
23
- Another difference from the Microchip bootloader is that it uses linker
24
- scripts from the Signal 11 PIC Linker Script Generator at
25
- https://github.com/signal11/pic_linker_script . The generated scripts make
26
- use of both the C preprocessor and more advanced linker script features to
27
- create linker scripts which can be used in the same form for both the
28
- bootloader and the application to be loaded by the bootloader. This way
29
- only a single linker script is needed for both projects (bootloader and
30
- application) which is less prone the inherent errors of manual edits. A
31
- single #define in the MPLABX project is used to select whether the linker
32
- script is being used for the bootloader or for the application (define
33
- either BOOTLOADER or BOOTLOADER_APP to select the mode). See the PIC Linker
34
- Script Generator README for more details.
33
+ Another difference from the Microchip bootloader is that for PIC24F it uses
34
+ linker scripts from the Signal 11 PIC Linker Script Generator at
35
+ https://github.com/signal11/pic_linker_script . The generated scripts for
36
+ PIC24F and the hand-modified scripts for PIC32MX make use of both the C
37
+ preprocessor and more advanced linker script features to create linker
38
+ scripts which can be used in the same form for both the bootloader and the
39
+ application to be loaded by the bootloader. This way only a single linker
40
+ script is needed for both projects (bootloader and application) which is
41
+ less prone to the inherent errors of manual edits. A single #define in the
42
+ MPLABX project is used to select whether the linker script is being used for
43
+ the bootloader or for the application (define either BOOTLOADER or
44
+ BOOTLOADER_APP to select the mode). See the PIC Linker Script Generator
45
+ README for more details.
35
46
36
47
Also different in the implementation is that the linker script passes flash
37
48
addresses to the bootloader firmware. This means that for MCUs with the
38
- same flash layout (such as the entire PIC24F family), the bootloader
39
- firmware and software source code does not have to change between different
40
- MCUs. Only the linker script does, with data that comes directly from the
41
- datasheets.
49
+ same flash layout (such as the entire PIC24F family and the entire PIC32MX
50
+ family), the bootloader firmware and software source code does not have to
51
+ change between different MCUs. Only the linker script does, with data that
52
+ comes directly from the datasheets. This means there are no #defines in the
53
+ source code with memory addresses and ranges for each MCU.
42
54
43
55
Software Implementation
44
56
------------------------
@@ -50,9 +62,10 @@ Supported Platforms
50
62
--------------------
51
63
Currently tested platforms are:
52
64
PIC24FJ64GB002
65
+ PIC32MX460F512L (PIC32 USB Starter Board)
53
66
54
- In theory, any PIC24F MCU should work as long as a suitable linker script
55
- is made.
67
+ In theory, any PIC24F or PIC32MX MCU should work as long as a suitable
68
+ linker script is made.
56
69
57
70
Contributing
58
71
-------------
@@ -65,7 +78,6 @@ Future Plans
65
78
Future goals include the following:
66
79
* More PIC24F platforms
67
80
* PIC16F PIC18F PIC24E, dsPIC33E
68
- * PIC32
69
81
Note that the USB stack will first have to be ported to several of those
70
82
platforms before te bootloader can be ported. Patches are welcome.
71
83
0 commit comments