Commit Graph

42 Commits

Author SHA1 Message Date
Travis Geiselbrecht
6ed6f36fa0 [warnings] remove some redundant declarations
Discovered with -Wredundant-decls
2024-04-19 00:07:49 -07:00
Travis Geiselbrecht
c892c958f4 [external] update raspberry pi pico SDK
Bump to version 1.5.1 from
https://github.com/raspberrypi/pico-sdk
6a7db34ff63345a7badec79ebea3aaef1712f374

All code verbatim with the exception of the removal of CmakeList.txt
files and a tweak to platform.h.
2024-02-27 00:12:23 -08:00
Alex Richardson
496e2f4b8c [riscv][clang] Use a CSR name instead of a numeric expression
Clang's assembler rejects expressions containing e.g. (1u << N) in the
assembler. Instead using numeric expressions for per-privilege level
CSRs, we can prepend `m` or `s`. This also lets the compiler assign the
CSR encoding instead of having to hardcode it in the source code.
2023-06-08 07:08:49 -07:00
Travis Geiselbrecht
2985728864 [stm32f4xx][stdperiph driver] remove +x from file modes in imported files 2022-08-14 19:00:16 -07:00
Travis Geiselbrecht
627e0a5cc0 [stm32f4xx][stdperiph driver] fix a typo in a wait loop 2022-08-14 18:59:50 -07:00
luka177
52ca5d32c9 [External-platform-stm32f4xx]: stm32f4xx.h remove redefenitions 2022-07-24 09:13:02 +03:00
luka177
f2459fe0ab Fix line ending 2022-07-24 08:52:42 +03:00
luka177
6abb5b3db7 [STM32F4xx_StdPeriph_Driver] Define assert_param 2022-07-21 19:22:19 +03:00
luka177
126abea100 Update to latest STM32F4xx_StdPeriph_Driver 2022-07-21 19:13:37 +03:00
Travis Geiselbrecht
5a3d51e3e7 [assert] fix up a few places broken at DEBUG=0 after recent assert changes
Forgot to test at DEBUG=0. Both of these are basically cases where
the new DEBUG_ASSERT_COND should be used, since the default DEBUG_ASSERT
will now always emit code that gets cleaned up in the optimizer.
2021-04-02 20:16:53 -07:00
Brian Swetland
e65436dca9 [external][pico] import source from rpi pico sdk
Origin: https://github.com/raspberrypi/pico-sdk
Branch: develop
Change: ebb228bfeaec81dce3b8ebdbf6c7f5fd580e2e2f

This is the contents of src/boads, src/common,
src/rp2040, and src/rp2_common, excluding cmake
goop.

I suspect we'll trim it back closer to just the
register definitions, but for now leave it mostly
as-is to simplify updating as the pico sdk updates
and we figure out how deeply (or not) to integrate
it with lk.
2021-02-15 21:06:05 -08:00
Eric Holland
d1bad2e683 [nrf][clock] use nrfx lib clock driver
Using Nordic's nrfx driver for the clock control peripheral since
it address a handful of errata and abstracts some differences
in the nrf52 family of parts.
2020-10-06 17:50:51 -04:00
Eric Holland
668be9d9fa [nrf52][i2c] Add nrfx i2c driver
Use twim(i2c) driver from nrfx library.  See comments and patterns in
target/nrf-pca10056 for info on how to properly utilize driver as it
requires some GLOBAL_DEFINES and gpio defines.
2020-09-28 09:07:27 -04:00
Eric Holland
80f464b7cb [nrfx] Cleanup glue for nrfx library
Errors were introduced when some drivers were compiled due to
nested macros and some conditionals used in LK macros.
2020-09-28 08:50:43 -04:00
Eric Holland
29b49dff83 [nordic][nrfx] Cleanup of nrfx integration 2020-09-21 13:26:07 -04:00
Eric Holland
b720536fe6 Nordic nrfx usb driver integration 2020-09-09 20:24:10 -04:00
Eric Holland
0f36150464 [nordic] use nrfx platform libs 2020-08-31 11:52:37 -04:00
Travis Geiselbrecht
f7d8e2300c [warnings] add -Wshadow which helps detect local variables that override globals
Nothing particularly bad showed up but cleaned up a bit of code.
2020-07-25 16:49:25 -07:00
Patrick Shickel
9a6081399c [stm32f0cube][bugfix] Fix race which leads to 0-length SETUP transfers
Fixes a race in the STM USB driver which can lead to the device seeing
only 0-length SETUP transfers. The bug ultimately leads to a failed
USB enumeration. The race condition is described in further detail
below.

The current behavior of the IRQ handler for received OUT transfers is
as such:

- Clear RX_CTR bit (at this point, HW sees that SW has acknowledged
previous SETUP/OUT transfer, and the HW will now accept new STATUS
transfers)
- Call out to the client OutStageCallback (nothing significant here)
- Set EP_RX_CNT back to size of max_packet (was previously set to 0 as
we expect to receive 0-length OUT transfer from host. HW uses this
value to limit the amount of data it can receive)
- Set RX_STAT back to VALID (the HW can now receive new STATUS/OUT
transfers)

The important thing to note here is that even before RX_STAT is set to
VALID in the last step, the HW can still receive and process a new
SETUP transfer as long as RX_CTR is cleared (the spec has some detail
about this under section "Control Transfers" on page 867:
https://www.st.com/resource/en/reference_manual/dm00031936.pdf). The
race will occur if we receive a SETUP transfer after clearing RX_CTR
but before adjusting EP_RX_CNT back to max_packet. In this case, the
IRQ handler will run for the newly received SETUP transfer, but the
transfer will have no data associated with it (the driver ends up
using the previous transfer data which was cached).

We can eliminate the race window by waiting to clear RX_CTR only after
we've reset EP_RX_CNT. In this case the HW will ignore any new SETUP
transfers until after the EP_RX_CNT is reset back to the desired
value.
2019-08-07 16:45:25 -07:00
Erik Gilling
4cf2997a04 [stm32f0] Update to STM32Cube v1.10.1. 2019-08-07 11:01:19 -07:00
Travis Geiselbrecht
1b7a28efb8 [include][lk] fixup lk/ include path move 2019-06-19 19:46:11 -07:00
Martin Foo
b66bd3e420 Add STM32F429I-DISCO1 support(default serial:USART1). 2019-06-19 18:18:52 -07:00
Travis Geiselbrecht
f98cef7992 [warnings] fix warnings across the entire code base
Fix or squelch all warnings in all code covered by buildall.
2018-12-16 17:33:22 -08:00
Eric Holland
31b8d1d217 [nrf] Support for NRF52840 DK 2018-05-02 14:50:41 -07:00
Todd Eisenberger
e007acc4dc [stm32f0xx] Add support for stm32f070xb
This cleans up handling of a lot of optional components
across f0xx models.
2018-04-17 10:52:14 -07:00
Travis Geiselbrecht
10bb61326b Merge pull request #146 from littlekernel/pr/nrf52
Pr/nrf52
2016-06-21 09:39:19 -07:00
Travis Geiselbrecht
d52054c87e Merge pull request #143 from konkers/pr/stm32f0-usb
stm32f0xx usb driver
2016-06-21 09:33:24 -07:00
Eric Holland
6388cde233 [nrf52] Platform and sample target support for Nordic NRF52 (cortex-M4) 2016-06-16 16:31:53 -07:00
Eric Holland
1491809fd0 [nrf52] First commit for platform support 2016-06-16 10:41:04 -07:00
Eric Holland
d1c4965dc7 [nordic] move vendor code to external 2016-06-07 10:11:54 -07:00
Erik Gilling
b88985bb2c [stm32f0xx] Add STM32F0xx_HAL_Driver. 2016-06-06 20:55:43 -07:00
Erik Gilling
6c82940c32 [stm32f0xx] Import new CMSIS from STM32Cube_FW_F0_V1.5.0. 2016-06-06 20:55:43 -07:00
Gurjant Kalsi
7d06370f75 [stm32f7][qspi][debug] Add tracing to QSPI driver and STM32f7xx QPSI library. Reset QSPI Controller during init. 2016-03-30 11:16:15 -07:00
Brian Swetland
0143e97c6e [external][cc13xxware] driver library for TI CC13xx parts
cc13xxware_2_03_00_16456 minus docs, precompiled binaries,
and linker files, as fetched from:

http://www.ti.com/tool/cc13xxware
2016-03-03 14:08:05 -08:00
Erik Gilling
6f277bb95d [stm32f0xx] remove STM32F0xx_StdPeriph_Driver. 2016-03-03 08:21:53 -08:00
Travis Geiselbrecht
e905886659 [platform][stm32f2xx] move ST's peripheral driver library into external/ 2016-02-20 11:31:50 -08:00
Travis Geiselbrecht
4bece86daa [platform][stm32f0xx] move ST's peripheral driver library into external/ 2016-02-20 11:31:50 -08:00
Travis Geiselbrecht
5b39a5d889 [platform][stm32f1xx] move ST's peripheral driver library into external/ 2016-02-20 11:31:50 -08:00
Travis Geiselbrecht
8d63a2dcb8 [platform][stm32f4xx] move ST's peripheral driver library into external/ 2016-02-20 11:31:50 -08:00
Travis Geiselbrecht
065785cb03 [platform][stm32f7xx] move the STM32F7xx_HAL_Driver out into external
Functionally equivalent, just rearranged to keep 3rd party code
separate.
2016-02-20 11:31:49 -08:00
Travis Geiselbrecht
b7cb4be62e [platform][stellaris] move TI's driver library into external/ 2016-02-20 11:31:49 -08:00
Travis Geiselbrecht
26effb3988 [platform][lpc15xx] move the lpcopen driver library into external/ 2016-02-20 11:31:49 -08:00