-
Notifications
You must be signed in to change notification settings - Fork 1
Adding support for a microcontroller
Maxime Vincent edited this page Jul 17, 2020
·
2 revisions
Welcome to the ucregview wiki!
Adding a new microcontroller is relatively easy:
-> Add a new directory: ucregview/targets/<your_micro> -> Add a new rules.mk file in that directory. You can copy another rules.mk file, and start from there.
-> Add a new directory: ucregview/st/<your_micro> -> You basically need at least 3 flies:
- linker script, that will put all output section into the "REGISTERS" section (.registers)
- H-file: with all the hardware register definitions (easiest is when they are structs)
- C-file: An allocation of each of those structs, at the right memory address (Linker script can put a certain section at a certain address, and a GCC attribute can easily put a specific struct in a specific section).
Different sources are available:
- Keil PACKs are interesting. They are basically .zip files and contain the headers and linker script you need: https://www.keil.com/dd2/pack/#/eula-container
- The manufacturer (ST, NXP, ...) should also provide board support packages (BSPs) with these files inside. Try their support pages.