summaryrefslogtreecommitdiffstats
path: root/rtems.py (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-10-06rtems: Formatting update with yapfHEADmasterChris Johns1-0/+3
2023-10-06Avoid StopIteration exception for non-rtems .pcMartin Erik Werner1-6/+8
_arch_from_arch_bsp() and _bsp_from_arch_bsp() has overly optimistic assumptions that the argument must contain a '-'-separated field which starts with "rtems". These functions are intended to find the target triplet or the bsp parts of strings like "sparc-gaisler-rtems5-leon3" and "arm-rtems6-xilinx_zynq_zc702" But _find_installed_arch_bsps() may call _arch_from_arch_bsp() with the name (without file extension) of any file which ends with ".pc", including for example "expat". This triggers a StopIteration exception when trying to find the next field after the "rtems" field, since no "rtems" field exists to start with. Rework these function to remove the preconditions, so that they return None if no "rtems" field exist or if no field exists before or after the "rtems" field. It could be argued. based on their name, that calling these functions with something that is not a triplet-bsp string is incorrect to start with, but attempting to address that is not done here.
2023-05-25Allow vendor field in toolchain target tripletMartin Erik Werner1-2/+6
Rework the splitting of arch and bsp to rely on the last field in the arch section starting with "rtems", instead of relying on the arch being exactly two fields in size. This makes sure that toolchains with a vendor field in their target triplet can be used with this build system. Toolchains produced by the RTEMS source builder tend to omit the vendor field, but for example the SPARC LEON/ERC32 toolchain provided by Gaisler through the RCC package does include a vendor field.
2023-04-19Parse includes in separate groups so isystem and sysroot paths and managedChris Johns1-8/+7
- This fixes the support for the change in RTEMS to use -isystem
2023-04-14Format with YAPFChris Johns1-127/+222
2023-04-14rtems: Fix IFLAGS and add arch_bsp_nameChris Johns1-26/+41
- Fix the IFLAGS env variable to be a list of includes without the compiler option - Add a utility call to return the arch/bsp as a name - Move the options into the configure section of waf
2021-02-23rtems: Add support to get arch bsp list in confVijay Kumar Banerjee1-0/+1
2020-07-27rtems: Add function to test waf uninstallVijay Kumar Banerjee1-0/+46
2020-07-27rtems: Add uninstall option to the list of commandsVijay Kumar Banerjee1-1/+1
2020-03-18rtems: Allow checking multiple environment variableVijay Kumar Banerjee1-4/+5
2019-10-10Use gccdeps for dependency scanning.Chris Johns1-3/+10
2019-09-19rtems: Add a library check.Chris Johns1-0/+8
2019-09-19rtems.py: Fix typoVijay Kumar Banerjee1-2/+2
2019-06-30rtems: Add more checks, ranlib and strip.Chris Johns1-3/+35
2018-10-22Avoid default RTEMS application configurationSebastian Huber1-23/+28
Use a test body with a proper RTEMS application configuration to avoid a dependency on the default configuration. Do not include <rtems/score/cpuopts.h> directly since this header file is an implementation detail. Update #3551.
2018-10-14rtems.py: Pass -EL, -EB, and -Gn to link phaseJoel Sherrill1-1/+1
closes #3424.
2018-08-12Change RTEMS path check from `bin` to `share/rtems<version>`.Chris Johns1-8/+7
There is no `bin` directory anymore with RTEMS 5 so the test fails. Check for the `share/rtems<version>` directory. Closes #3500.
2018-06-12Fix --show-commands.Christian Mauderer1-0/+2
In the current version of libbsd, if the --show-commands option is used, the cwd is passed as a Nod3. Popen does not work with that. Therefore create a string from cwd if it isn't already.
2018-04-09Fix bsp_init hook.Christian Mauderer1-1/+2
2018-04-06Add bsp_init hook.Christian Mauderer1-2/+7
2017-10-02Use the returned cflags. Add a Python 3 print helper.Chris Johns1-2/+4
2016-09-11rtems: Do not add --std=gnu+=11 when RTEMS is built with SMP.Chris Johns1-2/+0
2016-07-25Process all files to be added to a tar file.Chris Johns1-1/+1
2016-07-09Fix the --show-commands option.Christian Mauderer1-2/+2
If the --show-commands is set, the cmd-string is joined for printing. This breaks a later Popen call that expects an array instead of an fully assembled string. This patch fixes the problem.
2016-06-20Use long commands on more platformsSebastian Huber1-1/+2
2016-06-16Remove tabs as white space.Chris Johns1-1/+1
2016-06-16Fix the root_filesystem tar command on Windows.Chris Johns1-2/+7
2016-06-16Add long command line support for gcc.Chris Johns1-8/+61
2016-06-15Add root_filesystem support to create a root file system.Chris Johns1-0/+12
To use add to your wscript file: rtems.root_filesystem(bld, 'rootfs', ['etc/rc.conf'], 'rootfs.tar', 'rootfs-tar.o') to create a rootfs-tar.o which you add to your executable's list of sources. In your main or Init function add: #include <rtems/untar.h> extern int _binary_rootfs_tar_start; extern int _binary_rootfs_tar_size; static void expand_rootfs_tarfile(void) { rtems_status_code sc; rtems_printer printer; rtems_print_printer_printf(&printer); sc = Untar_FromMemory_Print((void *)(&_binary_rootfs_tar_start), (size_t)&_binary_rootfs_tar_size, &printer); if (sc != RTEMS_SUCCESSFUL) fprintf(stderr, "error: untar failed: %s\n", rtems_status_text(sc)); } Note, some arch's may not need the '_' at the start of the tar symbols.
2016-05-11Pass through commands we do not expand.Chris Johns1-0/+2
2016-05-07Correctly expand the commands for each BSP to build.Chris Johns1-7/+6
2016-04-18Remove the 4.11 reference and use the version argument.Chris Johns1-1/+1
2016-04-18Add default RTEMS version support, environment var checking and CC version ↵Chris Johns1-15/+50
message. Allow an application the ability to set a version number for RTEMS. This avoids issues with the automatic detection code. It means an application becomes keyed to a specific version of RTEMS. Check the environment for variables being set that could effect a build. We allow the environment to do this but it can have a side effect such as CC being set for one architecture and the rtems_waf being asked to use another. Print the version of CC being used. This is a diagnostic.
2015-11-14Fix module import for msys2Sebastian Huber1-1/+1
2015-11-13Delete non-existing RTEMS_ATOMICSebastian Huber1-5/+1
2015-11-13Derive default RTEMS version and path from prefixSebastian Huber1-19/+29
Now the configuration is quite simple for standard installations, e.g. waf configure --prefix=/opt/rtems-4.12 --rtems-bsps=sparc/sis
2015-11-13Derive default paths from RTEMS versionSebastian Huber1-48/+48
Close #2440.
2015-11-13Do RTEMS CPU options check earlySebastian Huber1-3/+7
Set mandatory C++ standard option in case SMP is enabled. Close #2418.
2014-09-22Fix the rtems-tld wrapper option.Chris Johns1-1/+3
2014-09-21Clean up the rtems-tld support.Chris Johns1-3/+5
2014-09-21Provide support for trac linking.Chris Johns1-7/+27
2014-06-23Let the user provide a handler that is called when configuring.Chris Johns1-1/+8
The handler is called with the BSP environment set up so the user can perform various checks.