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

Fix and clean up examples/pigweed-app/efr32 build #5513

Merged
merged 1 commit into from
Mar 22, 2021

Conversation

mspang
Copy link
Contributor

@mspang mspang commented Mar 20, 2021

  • Remove all of the duplicate include_dirs that were needed due
    to missing dependencies & improper use of private deps.
  • Add back an retargetserial.c file which is needed for this build. It
    was removed in fc59bd2 ("[3rd-party] update openthread and
    ot-br-posix ([3rd-party] update openthread and ot-br-posix #5062)")
  • Remove some unusual whitespace in defines

@mspang
Copy link
Contributor Author

mspang commented Mar 21, 2021

@jepenven-silabs How do we resolve the duplicate symbol error:

obj/third_party/connectedhomeip/third_party/openthread/repo/examples/platforms/efr32/src/libopenthread-efr32.uart.c.o: in function `USART0_RX_IRQHandler':
/__w/connectedhomeip/connectedhomeip/out/lock_app_debug/BRD4161A/../../../examples/lock-app/efr32/third_party/connectedhomeip/third_party/openthread/repo/examples/platforms/efr32/src/uart.c:259: multiple definition of `USART0_RX_IRQHandler'; obj/third_party/connectedhomeip/third_party/efr32_sdk/repo/hardware/kit/common/drivers/sdk.retargetserial.c.o:/__w/connectedhomeip/connectedhomeip/out/lock_app_debug/BRD4161A/../../../examples/lock-app/efr32/third_party/connectedhomeip/third_party/efr32_sdk/repo/hardware/kit/common/drivers/retargetserial.c:120: first defined here

- Remove all of the duplicate include_dirs that were needed due
  to missing dependencies & improper use of private deps.
- Add back an retargetserial.c file which is needed for this build. It
  was removed in fc59bd2 ("[3rd-party] update openthread and
  ot-br-posix (project-chip#5062)")
- Remove some unusual whitespace in defines
@mspang mspang force-pushed the for-chip/efr32-pigweed-app branch from 3f3e490 to b6a003a Compare March 22, 2021 04:19
@jmartinez-silabs
Copy link
Member

jmartinez-silabs commented Mar 22, 2021

@mspang I did some work to fix pigweed for efr32 after the Openthread submodule update brought some issues with the duplicate symbol error:. It is still on a branch as I wanted to make it better. retargetserial use the same IRQ that is used in the uart implementation in OT for the cli.

This is the file that is built with OT subrepo that brings this conflict

third_party/openthread/platforms/efr32/BUILD.gn
   "${openthread_root}/examples/platforms/efr32/src/uart.c",

It is also problematic for pigweed generally because OT calls efr32UartProcess periodicly and will get the data from the serial instead of the Pigweed functionnality if run on lighting example for example.

So I removed that file "${openthread_root}/examples/platforms/efr32/src/uart.c",

And wanted to reimplement those function in our side and make sure they don't do anything when the example is built for pigweed.

extern "C" __WEAK otError otPlatUartEnable(void)
{
    return OT_ERROR_NOT_IMPLEMENTED;
}

extern "C" __WEAK otError otPlatUartSend(const uint8_t *aBuf, uint16_t aBufLength)
{
    return OT_ERROR_NOT_IMPLEMENTED;
}

extern "C" __WEAK otError otPlatUartFlush(void)
{
    return OT_ERROR_NOT_IMPLEMENTED;
}

extern "C" __WEAK otError otPlatUartDisable(void)
{
    return OT_ERROR_NOT_IMPLEMENTED;
}

extern "C" __WEAK void efr32UartProcess(void)
{
    // 
}

I was also reworking the UART driver to not use retargetserial and use dma

@woody-apple woody-apple self-requested a review March 22, 2021 16:27
@woody-apple woody-apple merged commit 2821473 into project-chip:master Mar 22, 2021
@mspang mspang deleted the for-chip/efr32-pigweed-app branch March 22, 2021 21:06
jimlyall-q pushed a commit to jimlyall-q/connectedhomeip that referenced this pull request Mar 26, 2021
- Remove all of the duplicate include_dirs that were needed due
  to missing dependencies & improper use of private deps.
- Add back an retargetserial.c file which is needed for this build. It
  was removed in fc59bd2 ("[3rd-party] update openthread and
  ot-br-posix (project-chip#5062)")
- Remove some unusual whitespace in defines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants