-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Introduce Bouffalo Lab SoC's #78795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce Bouffalo Lab SoC's #78795
Changes from 1 commit
b169a89
c71987d
0d79fd0
60d4562
5318a75
d3ac8c9
ba4daeb
784efc1
df8f88d
b20d5ad
2757196
01828de
b45434d
d032c73
902bb4e
dcaf4eb
a32c5ce
3173294
a699d4f
5613e36
6cfc420
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # Copyright (c) 2021-2024 Gerson Fernando Budke <[email protected]> | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| if(CONFIG_SOC_FAMILY_BFLB) | ||
|
|
||
| zephyr_library_named(hal_bouffalolab) | ||
nandojve marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
nandojve marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| zephyr_compile_definitions( | ||
| ARCH_RISCV | ||
| ) | ||
nandojve marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| zephyr_library_compile_definitions( | ||
| BFLB_USE_HAL_DRIVER | ||
| BFLB_USE_CUSTOM_LD_SECTIONS | ||
| ) | ||
|
|
||
| set(bflb_soc ${CONFIG_SOC_SUB_SERIES}) | ||
| set(bflb_drv_dir ${ZEPHYR_HAL_BOUFFALOLAB_MODULE_DIR}/drivers/${bflb_soc}_driver) | ||
| set(bflb_common_dir ${ZEPHYR_HAL_BOUFFALOLAB_MODULE_DIR}/common) | ||
| set(bflb_drv_src_dir ${bflb_drv_dir}/std_drv/src) | ||
|
|
||
| # Global includes to be used outside hal_gigadevice | ||
| zephyr_include_directories( | ||
| include | ||
| ${ZEPHYR_HAL_BOUFFALOLAB_MODULE_DIR}/include | ||
|
|
||
| ${bflb_drv_dir}/regs | ||
| ${bflb_drv_dir}/startup | ||
| ${bflb_drv_dir}/std_drv/inc | ||
|
|
||
| ${bflb_common_dir}/misc | ||
| ) | ||
|
|
||
| zephyr_library_include_directories( | ||
| ${bflb_common_dir}/soft_crc | ||
| ) | ||
|
|
||
| zephyr_library_sources( | ||
| ${bflb_drv_src_dir}/${bflb_soc}_aon.c | ||
| ${bflb_drv_src_dir}/${bflb_soc}_ef_ctrl.c | ||
| ${bflb_drv_src_dir}/${bflb_soc}_glb.c | ||
| ${bflb_drv_src_dir}/${bflb_soc}_hbn.c | ||
| ${bflb_drv_src_dir}/${bflb_soc}_l1c.c | ||
| ${bflb_drv_src_dir}/${bflb_soc}_pds.c | ||
| ${bflb_drv_src_dir}/${bflb_soc}_romapi.c | ||
|
|
||
| ${bflb_common_dir}/soft_crc/softcrc.c | ||
| ) | ||
|
|
||
| zephyr_library_sources_ifdef(CONFIG_USE_BFLB_ACOMP ${bflb_drv_src_dir}/${bflb_soc}_acomp.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_BFLB_ADC ${bflb_drv_src_dir}/${bflb_soc}_adc.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_BFLB_DAC ${bflb_drv_src_dir}/${bflb_soc}_dac.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_BFLB_DMA ${bflb_drv_src_dir}/${bflb_soc}_dma.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_BFLB_I2C ${bflb_drv_src_dir}/${bflb_soc}_i2c.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_BFLB_IR ${bflb_drv_src_dir}/${bflb_soc}_ir.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_BFLB_PWM ${bflb_drv_src_dir}/${bflb_soc}_pwm.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_BFLB_SPI ${bflb_drv_src_dir}/${bflb_soc}_spi.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_BFLB_UART ${bflb_drv_src_dir}/${bflb_soc}_uart.c) | ||
|
|
||
nandojve marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| endif() | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| # Copyright (c) 2021-2024 Gerson Fernando Budke <[email protected]> | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| config ZEPHYR_HAL_BOUFFALOLAB_MODULE | ||
| bool | ||
|
|
||
| config HAS_BFLB_HAL | ||
| bool | ||
|
|
||
| if HAS_BFLB_HAL | ||
|
|
||
| config USE_BFLB_ACOMP | ||
| bool | ||
| help | ||
| Enable BFLB Analog Comparator (ACOMP) HAL module driver | ||
|
|
||
| config USE_BFLB_ADC | ||
| bool | ||
| help | ||
| Enable BFLB Analog-to-Digital Converter (ADC) HAL module driver | ||
|
|
||
| config USE_BFLB_DAC | ||
| bool | ||
| help | ||
| Enable BFLB Digital-to-Analog Converter (DAC) HAL module driver | ||
|
|
||
| config USE_BFLB_DMA | ||
| bool | ||
| help | ||
| Enable BFLB Direct Memory Access controller (DMA) HAL module driver | ||
|
|
||
| config USE_BFLB_I2C | ||
| bool | ||
| help | ||
| Enable BFLB Inter-Integrated Circuit Interface (I2C) HAL module driver | ||
|
|
||
| config USE_BFLB_IR | ||
| bool | ||
| help | ||
| Enable BFLB Infrared Remote controller (IR) HAL module driver | ||
|
|
||
| config USE_BFLB_PWM | ||
| bool | ||
| help | ||
| Enable BFLB Pulse Width Modulation (PMU) HAL module driver | ||
|
|
||
| config USE_BFLB_SPI | ||
| bool | ||
| help | ||
| Enable BFLB Serial Peripheral Interface(SPI) HAL module driver | ||
|
|
||
| config USE_BFLB_UART | ||
| bool | ||
| help | ||
| Enable BFLB Universal Asynchronous Receiver/Transmitter (UART) | ||
| HAL module driver | ||
|
|
||
| endif # HAS_BFLB_HAL |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| /* | ||
| * Copyright (c) 2021-2024 Gerson Fernando Budke <[email protected]> | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
| #ifndef __BL_LD_SECTIONS_H | ||
| #define __BL_LD_SECTIONS_H | ||
|
|
||
| #define ATTR_STRINGIFY(x) #x | ||
| #define ATTR_TOSTRING(x) ATTR_STRINGIFY(x) | ||
| #define ATTR_UNI_SYMBOL __FILE__ ATTR_TOSTRING(__LINE__) | ||
| #define ATTR_CLOCK_SECTION __attribute__((section(".itcm.sclock_rlt_code." ATTR_UNI_SYMBOL))) | ||
| #define ATTR_CLOCK_CONST_SECTION __attribute__((section(".itcm.sclock_rlt_const." ATTR_UNI_SYMBOL))) | ||
| #define ATTR_TCM_SECTION __attribute__((section(".itcm.code." ATTR_UNI_SYMBOL))) | ||
| #define ATTR_TCM_CONST_SECTION __attribute__((section(".itcm.const." ATTR_UNI_SYMBOL))) | ||
| #define ATTR_DTCM_SECTION __attribute__((section(".dtcm.data"))) | ||
| #define ATTR_HSRAM_SECTION __attribute__((section(".hsram_code"))) | ||
| #define ATTR_DMA_RAM_SECTION __attribute__((section(".system_ram"))) | ||
| #define ATTR_HBN_RAM_SECTION __attribute__((section(".hbn_ram_code"))) | ||
| #define ATTR_HBN_RAM_CONST_SECTION __attribute__((section(".hbn_ram_data"))) | ||
| #define ATTR_FALLTHROUGH() __attribute__((fallthrough)) | ||
| #define ATTR_USED __attribute__((__used__)) | ||
| #define ATTR_EALIGN(x) __aligned(size) | ||
nandojve marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| #endif /* __BL_LD_SECTIONS_H */ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,8 @@ manifest: | |
| url-base: https://github.com/zephyrproject-rtos | ||
| - name: babblesim | ||
| url-base: https://github.com/BabbleSim | ||
| - name: nandojve | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should never be in the commit history, I am not sure what exactly are we achieving by leaving something like that in the manifest. Manifest changes must be squashed and always point to a tree hosted by the zephyr project. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Definitely, but there is no hal_bouffalolab yet. It is possible to use only one manifest version if we delay to introduce the board as one the latest commits. That will prevent bisect errors for this new platform because there won't be a target until the first board. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Until there is, a PR pointing at your personal repo is a "demo" PR, not ready for merge yet. It should be demoted to a GitHub draft to make sure it cannot be merged and to be excluded from PR scrubbing and stats. The PR name should be adjusted accordingly. There's also a DNM label.
Yes: bisectability requires that dependencies are always added before dependants. That's true no matter how many commits or PRs there are. It's fine if brand new code or HAL is not immediately tested yet but in the next commits/PRs coming right after. |
||
| url-base: https://github.com/nandojve | ||
nandojve marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| group-filter: [-babblesim, -optional] | ||
|
|
||
|
|
@@ -161,6 +163,12 @@ manifest: | |
| path: modules/hal/atmel | ||
| groups: | ||
| - hal | ||
| - name: hal_bouffalolab | ||
| remote: nandojve | ||
| path: modules/hal/bouffalolab | ||
| revision: sdk-v1.4.5 | ||
| groups: | ||
| - hal | ||
| - name: hal_espressif | ||
| revision: e52371024732a47a67fa9c889fbccd0aa6355f3a | ||
| path: modules/hal/espressif | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.