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

cmake: x86 and xtensa toolchain updates for SDK 0.11 #20221

Closed

Conversation

dcpleung
Copy link
Member

This includes the cmake changes needed for x86 and xtensa toolchains in SDK 0.11.

Includes:

  • Using x86_64 toolchain to build 32-bit x86 targets, so there is no need for a separate x86 32-bit toolchain (i586-zephyr-elf) anymore.
  • On Xtensa, each SoC requires its own toolchain. In order to distinguish among them, each Xtensa toolchain is placed in it own directory under the SoC name, allowing the build system to utilize different toolchain for different Xtensa SoCs.
  • Due to the Xtensa toolchain change and the addition of toolchain for intel_s1000_crb board, it is now possible to build for this board using Zephyr SDK. Changes are included to make this work, and these will allow us to build in CI.

@dcpleung
Copy link
Member Author

dcpleung commented Nov 4, 2019

FYI, this would not pass CI until we have 0.11 SDK, since the Xtensa sample_controller toolchain cannot compile for intel_s1000.

Newlib requires a _heap_sentry so we add it to the linker script,
similar to what other xtensa linker scripts.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
One of the return variable is declared and used, but never
assigned values. So fix it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
When not using XCC, XCHAL_CACHE_MEMCTL_DEFAULT is not defined
which results in some variables not being able to be defined.
So define them.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
There are compiler error about the entry functions of two threads
not returning anything. So add return statement to fix it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Including math.h requires Newlib so enable it in project
configuration file.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Use assembly for _xt_set_intset() and _xt_set_intclear() instead of
calling into the Xtensa HAL, allowing these to be inlined.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The DT_LP_SRAM_* are aliases to DT_MIMO_SRAM_1_* which
are deprecated, so changing these to DT_INST_1_MMIO_SRAM_*.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds support for Zephyr SDK 0.11.* by simply copying
from 0.10.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Xtensa requires building a new toolchain for a specific SoC.
By default xtools built Xtensa toolchains all have prefix of
xtensa-zephyr-elf. In order to distinguish different toolchains,
they are now placed in their own directories under their SoC
name. This allows us to have multiple Xtensa toolchains
targeting multiple SoCs.

The additional level in path name is introduced in SDK v0.11.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The x86_64 toolchain in the SDK has been updated to build
for 32-bit targets (as it has 32-bit soft float libraries).
So change both xtools and v0.11 SDK to use x86_64 to
build for 32-bit x86 targets.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This allows applications targeting intel_s1000_crb to be
compiled with sdk or xtools toolchain.

Also copy the testing ignore_tags from qemu_xtensa for
net and bluetooth.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
@dcpleung
Copy link
Member Author

Most of these are merged. The remaining patches can be submitted separately.

@dcpleung dcpleung closed this Nov 19, 2019
@dcpleung dcpleung deleted the x86_xtensa_toolchain_updates branch November 19, 2019 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: API Changes to public APIs area: Boards area: Build System area: Samples Samples area: Toolchains Toolchains area: X86 x86 Architecture (32-bit) area: X86_64 x86-64 Architecture (64-bit) area: Xtensa Xtensa Architecture
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants