forked from tinygo-org/tinygo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change set to produce a working blinky example
This is a minimum viable set of changes to tinygo, to get a blinky example running. These should be broken into separate steps. The changes are roughly: * Remove the second stage bootloader because it has been replaced by the boot rom on the rp2040 * Add a minimum viable image desciptor to the binary, to allow the boot rom to recongize the binary as an application * Disable the peripheral resets because the hardware works differently than the RP2040 (need to re-evaluate this) * Skip PLL init because the boot rom should have enabled it. This should definitely be fixed and then re-enabled. * When enabling a GPIO pin, disable the isolation latch Only the GPIO hardware seems functional, the init routines should be improved before continuing with other peripherals.
- Loading branch information
Showing
9 changed files
with
30 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,8 @@ import ( | |
"unsafe" | ||
) | ||
|
||
var DefaultUART = UART0 | ||
|
||
const ( | ||
LED = GPIO25 | ||
_NUMBANK0_GPIOS = 48 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ SECTIONS | |
.text : | ||
{ | ||
KEEP(*(.isr_vector)) | ||
KEEP(*(.embedded_block)) | ||
*(.text) | ||
*(.text.*) | ||
*(.rodata) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Inspired by embedded_start_block.inc.S and embedded_end_block.inc.S | ||
// Minimum viable block image from datasheet section 5.9.5.1, "Minimum Arm IMAGE_DEF" | ||
.section .embedded_block, "a" | ||
.p2align 2 | ||
embedded_block: | ||
.word 0xffffded3 | ||
.word 0x10210142 | ||
.word 0x000001ff | ||
.word 0x00000000 | ||
.word 0xab123579 | ||
embedded_block_end: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters