mynewt-core icon indicating copy to clipboard operation
mynewt-core copied to clipboard

Compiler packages for appcore and netcore of nRF5340

Open simonratner opened this issue 3 years ago • 3 comments

Commit disabling DSP instructions for M-33 suggests creating a custom compiler package for BSPs that need it: https://github.com/apache/mynewt-core/commit/bafc7e0e08057502d26fd7b84c89ac341c80e970.

Given that nRF5340 appcore and netcore BSPs are in-tree, and appcore supports DSP instruction set while the netcore does not, I think the two compiler packages themselves should be in the tree: arm-none-eabi-m33 and arm-none-eabi-m33-nodsp, so that the corresponding Nordic BSPs can be used directly from the repo.

simonratner avatar Mar 17 '21 02:03 simonratner

So, this can be solved by specifying pkg.cflags: for the respective BSP. apps, BSPs, targets and compiler packages when provided with pkg.cflags get applied to the entire build. cc: @ccollins476ad @vikrant-proxy

vrahane avatar Apr 14 '21 17:04 vrahane

So, I think we can resolve this issue.

vrahane avatar Apr 14 '21 17:04 vrahane

Yes, although I am not sure what the result of specifying multiple -mcpu options is. Would this prevent the compiler package from specifying a default?

I have not tested this with cflags, but with lflags the order of options is also not preserved currently, which could make this trickier (https://github.com/apache/mynewt-newt/issues/429).

simonratner avatar Apr 15 '21 09:04 simonratner