Commit Graph

9 Commits

Author SHA1 Message Date
Graham Sanderson
0e4e25a343
Rework build targets such that: (#1211)
1. Make sure Pico SDK libraries have the correct dependencies on other SDK libraries
2. Pico SDK libraries all have _headers variants to include the headers. This may facilitate building user STATIC libraries without
   pulling in SDK code, though care will still need to be taken w.r.t. values of #defines
3. Make sure the _headers versions also have the correct dependencies

Note: There are a few exceptions to 1. for some non code libraries like pico_standard_link and pico_cxx_options
2023-01-30 10:56:03 -06:00
Peter Pettersson
3bd7a829db
Some optimizations for the hardware divider (#1033)
* Remove unnecessary wait in pico_divider.

There is no need to wait if there is more than 8 cycles between setup and result readout.
Dividend/divisor readout should be correct without delay. Update comment to reflect that.

* Optimize hw_divider_save_state/hw_divider_restore_state.

Doing multiple pushes to avoid stack usage is faster.
The wait loop in hw_divider_save_state had an incorrect branch in the wait loop.
This didn't matter since the wait wasn't necessary to begin with.

* Remove pointless aligns in hardware_divider.

The regular_func_with_section inserts a new section so if aligning
is desired it should be placed in the macro after section start.

* Save a few bytes in hardware_divider.

Signed and unsigned code can use the same exit code.
Branching to the common code is free since we need the 8 cycle
delay anyway.
2022-10-16 17:40:22 -05:00
Graham Sanderson
574fdee37b
Fixup divider save_restore for floating point too; improve tests (#405)
- The divider state needs to be saved for __aeabi_ddiv, __aeabi_fdiv, __aeabi_dtan and __aeabi_ftan or they won't work in interrupts *(probably not used much youd hope), or on an RTOS context switch
 - Refactored code out for the integer and floating point cases
 - Improved the floating point 'tests' in passing to check more return values against GCC implementations
 - Added floating point usage to the IRQ nesting test case
2021-05-13 07:38:42 -05:00
Graham Sanderson
b7da70a53b
make all non hardware_ libraries foo add C preprocessor definition LIB_FOO=1, and remove bespoke definitions which were all undocumented anyway (#374) 2021-05-04 08:00:17 -05:00
graham sanderson
503bc8b385 Fixup another level of compiler warnings, add _U() definition 2021-03-04 21:22:48 -06:00
Luke Wren
d4c9dced40 Add missing extern "C" to header files (closes #104) 2021-03-04 21:22:47 -06:00
Brian Swetland
a362925eda Clean up various C source and headers to appease -Wstrict-prototypes
In C, func() is a function taking an unspecified number of arguments,
vs func(void) a function taking no arguments. In C++ both forms indicate
"no arguments."

Update these headers to use the (void) form, which is correct in both
languages and avoids complaints when -Wstrict-prototypes is specified.
2021-03-04 21:22:47 -06:00
graham sanderson
3e52e57f5f Standardise references to the Raspberry Pi Pico SDK 2021-02-01 14:46:45 -06:00
graham sanderson
26653ea81e Initial Release 2021-01-20 10:44:27 -06:00