Commit Graph

741 Commits

Author SHA1 Message Date
graham sanderson 6a7db34ff6 revert changes to when -nostartfiles is specified in link for 1.5.1 as it can cause link errors with C++; see #1368 2023-06-13 17:27:33 -05:00
graham sanderson 8ecc5ababa set release version 1.5.1 2023-06-13 11:52:27 -05:00
Graham Sanderson f316272a80
Move multicore_lockout victim initialzied tracking to pico_multicore (#1427)
* Move multicore_lockout victim initialzied tracking to pico_multicore via new  multicore_lockout_victim_is_initialzied method, so user initialization of the multicore_lockout independent of pico_flash will work
2023-06-13 10:52:37 -05:00
Andrew Scheller bb460d076f
Add missing "default defines" (#1426)
To match the documented PICO_CONFIG default values
2023-06-13 10:49:51 -05:00
Andrew Scheller 0be7fb8045
Add missing doxygen ingroup tags (#1425)
So that the doxygen-descriptions end up in the right place
2023-06-13 08:56:00 -05:00
Graham Sanderson 3352ccf5de
split asm volatile back out (#1420) 2023-06-10 11:15:08 -05:00
Liam Fraser 7119978e92
Update svd using latest version of generation tools (#1417) 2023-06-09 09:39:17 -05:00
Peter Harper 0423d7a257
Update BTstack to pick up fix. (#1418) 2023-06-08 10:20:03 -05:00
Peter Harper c0a615e99c
Improve the comments around VSYS/VBUS config. (#1414) 2023-06-07 11:52:07 -05:00
Peter Harper ab766096e5
WIP: Add btstack files missing from build (#1380) 2023-06-07 11:28:30 -05:00
Peter Harper 1b81fcc704
Update to btstack v1.5.6 (#1415)
Fixes #1376
2023-06-07 11:27:10 -05:00
Peter Harper f3ebd62d51
Flash bank customisation (#1293)
* Support dynamic location for flash bank offset

Allow the pico_flash_bank_get_offset function to be changed by
defining pico_flash_bank_get_storage_offset_func
2023-06-06 12:48:09 -05:00
andygpz11 d315a04661
Correct writes to the UART LCR register (#1347)
Co-authored-by: Luke Wren <wren6991@gmail.com>
2023-06-06 12:08:53 -05:00
Graham Sanderson f28bbfd4ec
Add new pico_flash library with flash_safe_execute(func) (#1412)
* Add new pico_flash library, with flash_safe_execute(func) method to help with preventing IRQs and other core accessing flash with pico_multicore or FreeRTOS SMP
2023-06-06 11:19:27 -05:00
Graham Sanderson 8188adf98b
avoid calling find_package for pico-sdk-tools over and over again (#1403) 2023-06-06 10:46:17 -05:00
Peter Harper 5d47872cb4
Update cyw43-driver to main (#1408)
Latest version of driver includes BT fixes

Fixes #1377
2023-06-03 07:33:35 -05:00
Peter Harper 6a221e023d
Add dma_channel_cleanup method and use it to cleanup after pico_cyw43_driver is closed (#1372) 2023-06-02 12:52:39 -05:00
Graham Sanderson 3b44b0d177
update cmake vars which come from environment with FORCE so they can be updated (#1405) 2023-06-02 12:49:54 -05:00
Peter Harper 8e89e955fc
Fix PICO_CYW43_ARCH_POLL header guard (#1407)
Fixes #1268
2023-06-02 12:49:20 -05:00
Graham Sanderson c026314e17
subs requires a lo register (#1402) 2023-05-29 11:10:11 -05:00
hubiscode b0a6f244f3
USB descriptor string length. (#1341)
Implement a mechanism to set the maximum string length used in
tud_descriptor_string_cb() by defining USBD_DESC_STR_MAX. If
USBD_DESC_STR_MAX is not defined, the behavior remains unchanged and the
previous default value of 20 is used. A compile time error is produced
if USBD_DESC_STR_MAX is higher than 127 since the length of the string
plus header is returned in a single byte as (2 * len + 2). Similarly, a
compile time error is generated if the length is defined as less than 17
in order to ensure that there is enough room for the 16-character serial
number plus header.
2023-05-29 10:10:19 -05:00
Malte Thiesen c7211db2b3
Fixed assert when calling cancel_alarm(0) (#1173) 2023-05-26 12:22:09 -05:00
Peter Harper 826efbc524
pico_lwip_arch build fix (#1389)
It should use pico_mirrored_target_link_libraries.

Fixes #1387
2023-05-26 08:46:45 -05:00
Peter Harper 5ee4c1c3ee
Add cyw43_arch_disable_sta_mode (#1383)
We have a function to "enable" STA mode, so add a "disable" version to
match AP mode.

Fixes #1371
2023-05-26 08:45:30 -05:00
Peter Harper 8dbc6f20a3
Bt wifi buffer corruption (#1362)
Change from Infineon to fix the BT buffer corruption which occurs when
making heavy use of BT and WIFI at the same time.

Update cyw43-driver (Includes fix for BT+Wifi buffer corruption issue)
2023-05-26 08:28:12 -05:00
Graham Sanderson c34d3d5602
Work around issue with unreferenced sections marked allocated in the asm being discarded by GNU linker (#1391) 2023-05-26 07:04:40 -05:00
Graham Sanderson affbb31a8c
fix build (#1395) 2023-05-25 19:41:23 -05:00
andygpz11 8888fd7998
Add a PICO_CONFIG control to disable switching the peripheral clk to usb clk when the sys pll is changed 2023-05-25 15:47:32 -05:00
andygpz11 4515719909
Add conditionalization for (potentially unused) struct and function (#1282) (#1348) 2023-05-25 15:46:47 -05:00
Michael Busby 1d9f1873d5
add cyw43_arch_disable_ap_mode() to cyw43_arch (#1331) 2023-05-25 15:21:48 -05:00
Brendan 8ebb83ccaa
resolves #1161 (#1322)
This corrects the mismatched `PICO_DEFAULT_I2C` bus number (favors the breadboard pins not the stemma connector).
2023-05-25 15:20:32 -05:00
James Hughes ab4f23c7ee
Update mainpage.md (#1320) 2023-05-25 15:18:32 -05:00
djazz 7070d230c0
GCC 13 update. Move #include <cstdint> to header. Fixes #1363 (#1367) 2023-05-24 07:51:59 -05:00
Peter Harper 257959bc07
Add user_data to async_when_pending_worker_t. (#1384)
Fixes #1382
2023-05-22 09:14:11 -05:00
Andrew Scheller 62201a83e2
MarkDown syntax typo (#1366) 2023-05-07 10:34:33 -05:00
Peter Harper e87f11bd2b
Add some configuration for VBUS / VSYS (#1252)
The process for reading VBUS and VSYS on Pico and Pico W is different.
It's hard to write code that compiles for both devices.
Add some configuration to the board files.

Fixes #1222
2023-03-27 09:43:26 -05:00
andygpz11 a42564b4b4
Allow support of crystals other than 12MHz (#1024) (#1272)
* Allow pre-processor overrides for Clock/PLL setup
* Use `_KHZ` rather than `_MHZ` for `XOSC_` `SYS_CLOCK_` etc definitions (`_MHZ` versions are provided for compatibility when `_KHZ` is a multiple of 1000)

Co-authored-by: graham sanderson <graham.sanderson@raspberrypi.com>
2023-03-21 12:49:20 -05:00
Liam Fraser cb0ac5bd1a
CI: Improve multi-gcc workflow (#1316) 2023-03-20 16:51:13 -05:00
arjunak234 be4c80d355
include cstdint (#1318)
This fixes build on newer versions of GCC(13.0.1)
2023-03-20 16:48:48 -05:00
Peter Harper 4000c9f414
Allow malloc and free to be changed. (#1309)
Bluetooth needs a tempoarary buffer to load firmware. Micropython won't
work safely with malloc and free so allow these calls to be changed by
using cyw43_malloc / cyw43_free macros.
2023-03-20 11:52:35 -05:00
Peter Harper 2bfa90ccbb
Set PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS (#1253)
If PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS is passed to cmake, use it to
set the build macro of the same name.

Fixes #1210
2023-03-19 16:44:08 -05:00
agento2 cd54c3297d
Add Default for the thingplus ws2812 (#1312) 2023-03-19 16:35:00 -05:00
Graham Sanderson 7f7232541a
switch all .S files to unified asm, and use a macro to setup compiler and some other misc changes (#1295)
* switch all .S files to unified asm, and use a new macro `pico_default_asm_setup` to setup compiler to help porting to other compilers. Also some minor tweaks:
* switch some code to use more recent helper methods (e.g. busy_wait_at_least_n_cycles)
* add documentation to host divider header (I had this ages ago and never promoted)
* fixup erroneous docs about 32p32 values in all divider headers
* fix some compiler warnings
* rename recently added `unified_asm` macro to `pico_default_asm`
2023-03-09 17:40:20 -06:00
Paul Grayson dca773f36b
Add board definition for upcoming Pololu 3pi+ 2040 Robot (#1259)
Co-authored-by: Paul Grayson <paul@pololu.com>
2023-03-04 18:28:21 -06:00
Peter Harper 0b285af452
Revert change to cyw43_hal_generate_laa_mac (#1291)
This was changed to use the same algorithm as MP.

This function is used to set the wifi mac if OTP is unset (which
shouldn't ever be the case). But if it does occur, changing the mac
might cause issues, so lets play safe and revert the change.
2023-03-01 15:10:49 -06:00
Graham Sanderson 1ac90374e3
Various small fixes towards building with other compilers (#1285)
* Fix various non-GCC warnings (no effect on GCC)
* Reduce use of typeof since non GCC compilers may not support it
* Introduce PICO_C_COMPILER_IS_GNU, PICO_C_COMPILER_IS_CLANG, PICO_C_COMPILER_IS_IAR to CMake as if (CMAKE_C_COMPILER_ID STREQUAL "xxx") is a bit verbose
* Use "unified_asm" macro for all inline asm (it is "volatile __asm" on GNU with a .syntex unified)
* Use NOLOAD instead of COPY in linker scripts (arguably more correct anyway)
* Use the same style for setting _etext in all 4 linker scripts (to the beginning of .data). Clang aligns .data on a 16 byte boundary. Note ideally we'd
  add a new symbol __data_source, however that would break backwards compatibility with existing user linker scripts
* Use "a" for .stack, .heap sections because clang complains otherwise, and they are explicitly NOLOAD anyway
* Avoid duplicating __sev, __wfe, __wfi which Clang sometimes seems to provide as built-ins
* Add missing kitchen_sink_blocked_ram binary
* Allow build with LLVM Embedded Toolchain Form ARM v 14.0.0 (unsupported atm)
2023-03-01 15:10:18 -06:00
Peter Harper bc7d9ce95a
Fix some header dependencies in bluetooth (#1294)
If you just want to link to pico_btstack_flash_bank_headers to include
the header file you also have to link to pico_btstack_base_headers.

ENABLE_CLASSIC and ENABLE_BLE are used in header files so should be
added by the headers library

Fixes #1271
2023-03-01 13:12:55 -06:00
Graham Sanderson 18479e0300
filter pull request source for pull_request to avoid IAR (#1289) 2023-02-27 19:18:03 -06:00
Graham Sanderson 67b0a11d3e
remove iar/ branches from default workflow (#1288) 2023-02-27 18:59:41 -06:00
Peter Harper d9c88c6306
Make sure BT device address is set. (#1284)
* Make sure BT device address is set.
* Change cyw43_hal_generate_laa_mac to match MicroPython
2023-02-27 11:12:20 -06:00