I managed to avoid the multicore trampoline by messing with the signature of the core 1 startup function.
While the first couple arguments to a function with the arm C abi are passed in registers, once they're filled up, the rest of the arguments go on the stack; so, I put some dummy arguments before the real arguments to force them to go onto the stack. That allows it to be used directly, without needing the trampoline to move the arguments from the stack to registers.
I also changed the startup function to be generic over the function type passed, which avoids the mess of dealing with `Core1Main` and fat pointers and all that.
Using the full module structure generated by the intrinsics macro
interacts oddly with inlining on some optimization levels, causing
a duplicate identical function body to be generated. This doesn't
affect performance, but it wastes space, so just declare the alias
directly which seems to cause the symbol to be aliased as it should
be.
* add example of synchronized PIOs
* Synchronize state machines using WAIT IRQ instruction
* Use "irq wait 0" instead of "wait 1 irq 0"
This way, the initial value of the interrupt flag doesn't matter
* Start state machines synchronized without IRQ WAIT instruction
* Improve API
Co-authored-by: Andrew Straw <strawman@astraw.com>
* Add an rp2040 specific #[entry] macro.
This macro extends the one from cortex-m-rt by code to unlock
all spinlocks on boot.
* Idiomatic pointer arithmetic
Apply suggestion by @9names, improving address calculations.
(This doesn't change the generated code at opt levels 2 or "z".)
Co-authored-by: 9names <60134748+9names@users.noreply.github.com>
* Update BSP authors to include 'rp-rs developers'
* Update BSP readme's to reflect current release version
* Update BSP changelogs
* Fix version number in HAL README
* Update changelog for 0.4.0 release
* Enable rt feature for irq example in Cargo.toml
* Bump pio/pio-proc deps to 0.2.0, update pio examples
* Update BSPs to latest ws2812-pio, remove unused pio dep
* Fix usage of pio_proc in doc comment
* Clean up pio doc-example
* Update rp-pico to latest i2c-pio
Co-authored-by: Jan Niehusmann <jan@gondor.com>
Fix a few function signatures that don't match the ROM according to the
datasheet.
_memset4 also has a wrong code in the datasheet, so match it to the
actual ROM.
Make all ROM functions (normal and floating point) provide both a direct
call that does the operation and a module with a ptr() function to get
the function pointer.