Skip to content
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

Add sltb009a BSP #749

Merged
merged 2 commits into from
Apr 1, 2021
Merged

Add sltb009a BSP #749

merged 2 commits into from
Apr 1, 2021

Conversation

perigoso
Copy link
Collaborator

Board support for the EFM32GG12 Dev Board

For use with the efm32 family driver added in #703

@perigoso perigoso marked this pull request as draft March 23, 2021 21:46
@hathach
Copy link
Owner

hathach commented Mar 25, 2021

#703 is merged, could you rebase/erge from master to see it could fix the ci.

@perigoso
Copy link
Collaborator Author

perigoso commented Mar 25, 2021

ah right, I almost forgot about this issue

The silabs cmsis has both a assembly startup and a C startup, on the same dir, for some reason this generates some conflict (im only including the assembly startup), the only way i got this to work was by deleting the c startup

this is why the build fails

@perigoso
Copy link
Collaborator Author

I don't really understand this issue

[perigoso@perigoso-desktop hid_generic_inout]$ make BOARD=sltb009a print-SRC_C
SRC_C = hw/mcu/silabs/cmsis-dfp-efm32gg12b/Device/SiliconLabs/EFM32GG12B/Source/system_efm32gg12b.c src/portable/silabs/efm32/dcd_efm32.c hw/bsp/board.c hw/bsp/sltb009a/sltb009a.c examples/device/hid_generic_inout/src/main.c examples/device/hid_generic_inout/src/usb_descriptors.c src/tusb.c src/common/tusb_fifo.c src/device/usbd.c src/device/usbd_control.c src/class/audio/audio_device.c src/class/cdc/cdc_device.c src/class/dfu/dfu_rt_device.c src/class/hid/hid_device.c src/class/midi/midi_device.c src/class/msc/msc_device.c src/class/net/net_device.c src/class/usbtmc/usbtmc_device.c src/class/vendor/vendor_device.c
[perigoso@perigoso-desktop hid_generic_inout]$ make BOARD=sltb009a print-SRC_S
SRC_S = hw/mcu/silabs/cmsis-dfp-efm32gg12b/Device/SiliconLabs/EFM32GG12B/Source/GCC/startup_efm32gg12b.s

the file it complains about isnt even supposed to be compiled

/home/perigoso/Development/tinyusb/hw/mcu/silabs/cmsis-dfp-efm32gg12b/Device/SiliconLabs/EFM32GG12B/Source/GCC/startup_efm32gg12b.c:44:17: error: conflicting type qualifiers for '__copy_table_start__'
   44 | extern uint32_t __copy_table_start__;
      |                 ^~~~~~~~~~~~~~~~~~~~

@perigoso
Copy link
Collaborator Author

I think this might be some oversight on the buildsystem
to clarify
the issue here is that there are two files named the same in the silabs cmsis, one in C and the other in assembly
hw/mcu/silabs/cmsis-dfp-efm32gg12b/Device/SiliconLabs/EFM32GG12B/Source/GCC/startup_efm32gg12b.S
hw/mcu/silabs/cmsis-dfp-efm32gg12b/Device/SiliconLabs/EFM32GG12B/Source/GCC/startup_efm32gg12b.c
the only file being included is the assembly one, and thats the only one we want to compile, but it seems the project tries to compile the c file too

@perigoso
Copy link
Collaborator Author

Needs #755 fixed for successful build

@perigoso
Copy link
Collaborator Author

my dev board arrived today, will test this tomorrow

@hathach
Copy link
Owner

hathach commented Mar 30, 2021

you probably miss the freertos header include for the efm https://github.com/hathach/tinyusb/blob/master/hw/bsp/board_mcu.h . It is not too obvious and well-placed currently. I plan to refactor it later on

@perigoso perigoso force-pushed the bsp-sltb009a branch 2 times, most recently from 97734e8 to 014e4aa Compare March 31, 2021 21:47
Signed-off-by: Rafael Silva <[email protected]>
@perigoso
Copy link
Collaborator Author

I just tested the dev board and the board support code i wrote works :)
I have not tested the buttons or implemented uart, but the devices enumerates and theres visual feedback from the leds

@perigoso perigoso marked this pull request as ready for review March 31, 2021 22:47
@perigoso
Copy link
Collaborator Author

If everything looks good to you you can merge, feel free to request changes

Copy link
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superb !! Thank you very much for your PR. It looks perfect now

@hathach hathach merged commit e4f5a5d into hathach:master Apr 1, 2021
@perigoso perigoso deleted the bsp-sltb009a branch March 30, 2022 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants