Skip to content

Pass only relevant defines at each stage of compilation #2377

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

Merged
merged 3 commits into from
Aug 5, 2016

Conversation

sarahmarshy
Copy link
Contributor

The toolchains' commands for compilation contain only the relevant macro definitions at each stage. I.e. the assembler command contains only those macros necessary for assembly.

This was intended to fix an issue with command buffer length for armasm within uvision. Many OOB testers were seeing the following error: project-generator/project_generator#429.

@screamerbg @sg-

@sarahmarshy sarahmarshy changed the title Pass only relevant defines to assemblers and compilers Pass only relevant defines at each stage of compilation Aug 4, 2016
@sarahmarshy
Copy link
Contributor Author

/morph export-build

@mbed-bot
Copy link

mbed-bot commented Aug 4, 2016

Result: ABORTED

Your command has finished executing! Here's what you wrote!

/morph export-build

@mbed-bot
Copy link

mbed-bot commented Aug 4, 2016

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph export-build

@sg-
Copy link
Contributor

sg- commented Aug 5, 2016

No regressions 👍

18:41:18 Successful: 
18:41:18   * build for NUCLEO_F429ZI::uvision5  MBED_BLINKY
18:41:18   * build for NUCLEO_L432KC::uvision5  MBED_BLINKY
18:41:18   * build for K64F::uvision5   MBED_BLINKY
18:41:18   * build for NUCLEO_L152RE::uvision5  MBED_BLINKY
18:41:18   * build for EFM32PG_STK3401::uvision5    MBED_BLINKY
18:41:18   * build for DISCO_F429ZI::uvision5   MBED_BLINKY
18:41:18   * build for NUCLEO_L073RZ::uvision5  MBED_BLINKY
18:41:18   * build for DISCO_F746NG::uvision5   MBED_BLINKY
18:41:18   * build for NUCLEO_F070RB::uvision5  MBED_BLINKY
18:41:18   * build for NUCLEO_F410RB::uvision5  MBED_BLINKY
18:41:18   * build for NUCLEO_F411RE::uvision5  MBED_BLINKY
18:41:18   * build for NUCLEO_F072RB::uvision5  MBED_BLINKY
18:41:18   * build for ARCH_PRO::uvision5   MBED_BLINKY
18:41:18   * build for MTS_DRAGONFLY_F411RE::uvision5   MBED_BLINKY
18:41:18   * build for NUCLEO_F446RE::uvision5  MBED_BLINKY
18:41:18   * build for DISCO_F469NI::uvision5   MBED_BLINKY
18:41:18   * build for NRF51_DK::uvision5   MBED_BLINKY
18:41:18   * build for NUCLEO_F103RB::uvision5  MBED_BLINKY
18:41:18   * build for KL25Z::uvision5  MBED_BLINKY
18:41:18   * build for NUCLEO_L476RG::uvision5  MBED_BLINKY
18:41:18   * build for MTS_MDOT_F411RE::uvision5    MBED_BLINKY
18:41:18   * build for NUCLEO_F091RC::uvision5  MBED_BLINKY
18:41:18   * build for NUCLEO_F746ZG::uvision5  MBED_BLINKY
18:41:18   * build for LPC1768::uvision5    MBED_BLINKY
18:41:18   * build for NUCLEO_F401RE::uvision5  MBED_BLINKY
18:41:18   * build for NUCLEO_F303RE::uvision5  MBED_BLINKY
18:41:18   * build for DISCO_L476VG::uvision5   MBED_BLINKY
18:41:18 Failed: 
18:41:18   * NUCLEO_F767ZI::uvision5    Build Failed for MBED_BLINKY
18:17:05 Successful: 
18:17:05   * build for NUCLEO_F429ZI::iar   MBED_BLINKY
18:17:05   * build for RZ_A1H::iar  MBED_BLINKY
18:17:05   * build for K64F::iar    MBED_BLINKY
18:17:05   * build for NUCLEO_L152RE::iar   MBED_BLINKY
18:17:05   * build for DISCO_F429ZI::iar    MBED_BLINKY
18:17:05   * build for MAXWSNENV::iar   MBED_BLINKY
18:17:05   * build for MAX32600MBED::iar    MBED_BLINKY
18:17:05   * build for DISCO_F746NG::iar    MBED_BLINKY
18:17:05   * build for LPC4088::iar MBED_BLINKY
18:17:05   * build for NUCLEO_F070RB::iar   MBED_BLINKY
18:17:05   * build for NUCLEO_F411RE::iar   MBED_BLINKY
18:17:05   * build for NUCLEO_F072RB::iar   MBED_BLINKY
18:17:05   * build for ARCH_PRO::iar    MBED_BLINKY
18:17:05   * build for MTS_DRAGONFLY_F411RE::iar    MBED_BLINKY
18:17:05   * build for LPC4088_DM::iar  MBED_BLINKY
18:17:05   * build for KL46Z::iar   MBED_BLINKY
18:17:05   * build for NUCLEO_F446RE::iar   MBED_BLINKY
18:17:05   * build for NRF51_DK::iar    MBED_BLINKY
18:17:05   * build for NUCLEO_F103RB::iar   MBED_BLINKY
18:17:05   * build for KL25Z::iar   MBED_BLINKY
18:17:05   * build for K22F::iar    MBED_BLINKY
18:17:05   * build for NUCLEO_L476RG::iar   MBED_BLINKY
18:17:05   * build for MTS_MDOT_F411RE::iar MBED_BLINKY
18:17:05   * build for NUCLEO_F091RC::iar   MBED_BLINKY
18:17:05   * build for NUCLEO_F746ZG::iar   MBED_BLINKY
18:17:05   * build for LPC1768::iar MBED_BLINKY
18:17:05   * build for NUCLEO_F401RE::iar   MBED_BLINKY
18:17:05   * build for NUCLEO_F303RE::iar   MBED_BLINKY
18:17:05   * build for DISCO_L476VG::iar    MBED_BLINKY
18:17:05 Failed: 
18:17:05   * NUCLEO_L432KC::iar Build Failed for MBED_BLINKY
18:17:05   * EFM32PG_STK3401::iar   Build Failed for MBED_BLINKY
18:17:05   * NUCLEO_L073RZ::iar Build Failed for MBED_BLINKY
18:17:05   * NUCLEO_F410RB::iar Build Failed for MBED_BLINKY
18:17:05   * NUCLEO_F767ZI::iar Build Failed for MBED_BLINKY
18:17:05   * DISCO_F469NI::iar  Build Failed for MBED_BLINKY

@sg- sg- merged commit 9d1fbda into ARMmbed:master Aug 5, 2016
@bogdanm
Copy link
Contributor

bogdanm commented Aug 5, 2016

I know this was already merged, but an observation: we seem to decide which macros are needed by an assembler source in a more or less random way. It might well be that an assembler source needs access to the same macros as a "regular" (C/C++) source.

@sg-
Copy link
Contributor

sg- commented Aug 5, 2016

I wouldnt say random, rather inline with expected use:

  • target.macros are macros, they should be everywhere
  • target.device_has emits macros used for porting and turning on/off c hal implementations and C++ classes that call these implementations. Should be no regression or assembly usecase for these
  • FEATURES / TOOLCHAIN / TARGET are used for scanning directories to build. Just so happens they also emit -D but TBH this was probably not by design, rather something that slipped in.
  • config this is a whole new thing for MCUs. If I think about how the rest of the microcontroller world does this (right or wrong), its usually a header file that must be included in all translation units. Id go as far to guess that assemblers will barf on the majority of config data we try to pass it anyways (ie not legal defines).

# asm flags only, common are not valid within uvision project, they are armcc specific
project_data['tool_specific']['uvision']['misc']['asm_flags'] = list(set(self.progen_flags['asm_flags']))
# need to make this a string for progen. Only adds preprocessor when "macros" set
asm_flag_string = '--cpreproc --cpreproc_opts=-D__ASSERT_MSG,' + ",".join(
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this --cpreproc --cpreproc_opts needed? I recall progen does it automatically if macros are defined?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Progen does this if common macros are defined, to be used with armcc and armasm. Because I am trying to distinguish between the two (without editing progen), I wanted to format this entire line to be used in this progen line.

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 8, 2016

@sg- Is it documented anywhere? If not, we should do add it.

FEATURES / TOOLCHAIN / TARGET are used for scanning directories to build. Just so happens they also emit -D but TBH this was probably not by design, rather something that slipped in.

all 3 are used in the source files. Toolchain and target macros to write a portable code. Are you saying that -D should not be done for those 3?

@sg-
Copy link
Contributor

sg- commented Aug 8, 2016

all 3 are used in the source files. Toolchain and target macros to write a portable code. Are you saying that -D should not be done for those 3?

Toolchains emit their own macros. Ours are redundant. -D for target directories scanned is not used in source (at least I hope not) and if we need a proper -D for the target, i'd argue we dont currently have one, again, its just something that slipped in as has been used (see above about directory scanning).

artokin pushed a commit to artokin/mbed-os that referenced this pull request Jun 8, 2020
…..b3fe574

b3fe574 Remove test files from the release
b2bf24c Merge branch 'release_internal' into release_external
0ed25a7 Fix errors found from coverity scan (ARMmbed#2386)
7a138f7 Added IID for border router info structure
4021b0c LLC secure data duplicate check update and EAPOL relay duplicate fix
b190a97 Remove Thread-protocol from README (ARMmbed#2383)
ae8ae32 EAPOL relay agent rx filter from joiner side
0d4eb7a Removed dead code part
fc644f5 RPL new parent accept update and NUD operation
f5920e2 ETX API update and RPL ETX threshold callback update.
1fdee20 Wi-sun keep all candidates alive by NUD.
bd746da Key storage settings are no longer cleared on delete
bd388fc Changed EAPOL initial-Key retries from 2 to 4 on large NW
a3d80a3 WS bootstrap: Default CCA threshold to -60dBm (ARMmbed#2377)
72b26a7 Created extra large network setup for Wi-SUN
38dd4a6 Corrected PTK and PMK lifetime handling
64f2a77 Cleared EAPOL temporary trace print's.
02ec23f Timed parent selection is now imim-imin*2 earlier there was just 5 seconds randomize.
3b2d906 Added check for network name and DODAG ID IID (EUI-64) (ARMmbed#2373)
ee45f4b Updated initial key trickles
184425b Fixed parent target address set.
07ec237 Updated Discovery and RPL setup large & medium size network
a94d8f2 RPL version num update
9e2ac1d Double default eapol entry size for test purpose.
6b8beef Clear all neighbors only on eapol next target check
faa19e1 Corrected next address set
8a917fb Continue trickle on initial EAPOL-key TX failure
cfdb193 Merge pull request ARMmbed#2368 from ARMmbed/sync_with_mbedos
f7a15fa (via MbedOS) ws: added support for brazilian regulatory domain
c397edb Changed large network initial-key trickle parameters
758f534 Added maximum frame counter storing interval
b0ea148 Corrected key storage configuration setting
be3c94e WS RPL paret soft filter update
8b1d537 Adjusted EAPOL limits and timers

git-subtree-dir: features/nanostack/sal-stack-nanostack
git-subtree-split: b3fe574
artokin pushed a commit to artokin/mbed-os that referenced this pull request Jun 8, 2020
…..b3fe574

b3fe574 Remove test files from the release
b2bf24c Merge branch 'release_internal' into release_external
0ed25a7 Fix errors found from coverity scan (ARMmbed#2386)
7a138f7 Added IID for border router info structure
4021b0c LLC secure data duplicate check update and EAPOL relay duplicate fix
b190a97 Remove Thread-protocol from README (ARMmbed#2383)
ae8ae32 EAPOL relay agent rx filter from joiner side
0d4eb7a Removed dead code part
fc644f5 RPL new parent accept update and NUD operation
f5920e2 ETX API update and RPL ETX threshold callback update.
1fdee20 Wi-sun keep all candidates alive by NUD.
bd746da Key storage settings are no longer cleared on delete
bd388fc Changed EAPOL initial-Key retries from 2 to 4 on large NW
a3d80a3 WS bootstrap: Default CCA threshold to -60dBm (ARMmbed#2377)
72b26a7 Created extra large network setup for Wi-SUN
38dd4a6 Corrected PTK and PMK lifetime handling
64f2a77 Cleared EAPOL temporary trace print's.
02ec23f Timed parent selection is now imim-imin*2 earlier there was just 5 seconds randomize.
3b2d906 Added check for network name and DODAG ID IID (EUI-64) (ARMmbed#2373)
ee45f4b Updated initial key trickles
184425b Fixed parent target address set.
07ec237 Updated Discovery and RPL setup large & medium size network
a94d8f2 RPL version num update
9e2ac1d Double default eapol entry size for test purpose.
6b8beef Clear all neighbors only on eapol next target check
faa19e1 Corrected next address set
8a917fb Continue trickle on initial EAPOL-key TX failure
cfdb193 Merge pull request ARMmbed#2368 from ARMmbed/sync_with_mbedos
f7a15fa (via MbedOS) ws: added support for brazilian regulatory domain
c397edb Changed large network initial-key trickle parameters
758f534 Added maximum frame counter storing interval
b0ea148 Corrected key storage configuration setting
be3c94e WS RPL paret soft filter update
8b1d537 Adjusted EAPOL limits and timers
9a21668 Merge branch 'release_internal' into release_external
8e72b80 MAC CCA thr: Check if channel out of range (ARMmbed#2363)
146a0a3 Corrected trace on authenticator
d04a96d Merge pull request ARMmbed#2361 from ARMmbed/sync_with_mbedos
2c2b915 Added empty function for ns time callback
76ac0de Remove NCS36510 target
0258ac3 Remove KW24D target
788f01b Netsocket/lwIP Stack: Remove support for ARM Compiler 5
2fbc7a1 Corrected invalid memory read on access revoke
941b9b4 Updates to stagger/latency (ARMmbed#2358)
c2abaaa Corrected defects
1811194 Corrected warning trace, validations and ut stubs
69e2d19 Added NS filesystem and interface to application
c5b6993 refactored packet ingress
a05605e Unsecured packets will be acked by default automatically.
36dfb29 MAC: Implemented automatic CCA threshold (ARMmbed#2353)
0396b97 Revert EAPOL simplify failure handling and focus this problem later on.
b2fe3d4 Ignoring authentication failure if security protocol already started
11de56d Added info API for Wi-SUN border router
87a4f69 Added EAPOL key storage to authenticator and unified GTK storage (ARMmbed#2345)
ff1ca25 EAPOL failure simplify and EAPOL relay agent add trace when eapol temp pool is empty
6667b31 Update NA trace
34cdafe Temporary EAPOL neighbour entry Update and MAC MLME update
d092f83 Iotthd 3995 (ARMmbed#2347)
e2ea4e4 Disabled BR (TLS server) EC calculation queue
5759851 Changed the rate limiting function to calculate the values runtime
899e755 Make it possible to update tr51 table to larger dynamically
8436669 Added configuration for DHCP lifetime value
da732bc When network name or PAN ID is changed authenticator updates MAC keys

git-subtree-dir: features/nanostack/sal-stack-nanostack
git-subtree-split: b3fe574
artokin pushed a commit to artokin/mbed-os that referenced this pull request Jun 8, 2020
…..b3fe574

b3fe574 Remove test files from the release
b2bf24c Merge branch 'release_internal' into release_external
0ed25a7 Fix errors found from coverity scan (ARMmbed#2386)
7a138f7 Added IID for border router info structure
4021b0c LLC secure data duplicate check update and EAPOL relay duplicate fix
b190a97 Remove Thread-protocol from README (ARMmbed#2383)
ae8ae32 EAPOL relay agent rx filter from joiner side
0d4eb7a Removed dead code part
fc644f5 RPL new parent accept update and NUD operation
f5920e2 ETX API update and RPL ETX threshold callback update.
1fdee20 Wi-sun keep all candidates alive by NUD.
bd746da Key storage settings are no longer cleared on delete
bd388fc Changed EAPOL initial-Key retries from 2 to 4 on large NW
a3d80a3 WS bootstrap: Default CCA threshold to -60dBm (ARMmbed#2377)
72b26a7 Created extra large network setup for Wi-SUN
38dd4a6 Corrected PTK and PMK lifetime handling
64f2a77 Cleared EAPOL temporary trace print's.
02ec23f Timed parent selection is now imim-imin*2 earlier there was just 5 seconds randomize.
3b2d906 Added check for network name and DODAG ID IID (EUI-64) (ARMmbed#2373)
ee45f4b Updated initial key trickles
184425b Fixed parent target address set.
07ec237 Updated Discovery and RPL setup large & medium size network
a94d8f2 RPL version num update
9e2ac1d Double default eapol entry size for test purpose.
6b8beef Clear all neighbors only on eapol next target check
faa19e1 Corrected next address set
8a917fb Continue trickle on initial EAPOL-key TX failure
cfdb193 Merge pull request ARMmbed#2368 from ARMmbed/sync_with_mbedos
f7a15fa (via MbedOS) ws: added support for brazilian regulatory domain
c397edb Changed large network initial-key trickle parameters
758f534 Added maximum frame counter storing interval
b0ea148 Corrected key storage configuration setting
be3c94e WS RPL paret soft filter update
8b1d537 Adjusted EAPOL limits and timers
9a21668 Merge branch 'release_internal' into release_external
8e72b80 MAC CCA thr: Check if channel out of range (ARMmbed#2363)
146a0a3 Corrected trace on authenticator
d04a96d Merge pull request ARMmbed#2361 from ARMmbed/sync_with_mbedos
2c2b915 Added empty function for ns time callback
76ac0de Remove NCS36510 target
0258ac3 Remove KW24D target
788f01b Netsocket/lwIP Stack: Remove support for ARM Compiler 5
2fbc7a1 Corrected invalid memory read on access revoke
941b9b4 Updates to stagger/latency (ARMmbed#2358)
c2abaaa Corrected defects
1811194 Corrected warning trace, validations and ut stubs
69e2d19 Added NS filesystem and interface to application
c5b6993 refactored packet ingress
a05605e Unsecured packets will be acked by default automatically.
36dfb29 MAC: Implemented automatic CCA threshold (ARMmbed#2353)
0396b97 Revert EAPOL simplify failure handling and focus this problem later on.
b2fe3d4 Ignoring authentication failure if security protocol already started
11de56d Added info API for Wi-SUN border router
87a4f69 Added EAPOL key storage to authenticator and unified GTK storage (ARMmbed#2345)
ff1ca25 EAPOL failure simplify and EAPOL relay agent add trace when eapol temp pool is empty
6667b31 Update NA trace
34cdafe Temporary EAPOL neighbour entry Update and MAC MLME update
d092f83 Iotthd 3995 (ARMmbed#2347)
e2ea4e4 Disabled BR (TLS server) EC calculation queue
5759851 Changed the rate limiting function to calculate the values runtime
899e755 Make it possible to update tr51 table to larger dynamically
8436669 Added configuration for DHCP lifetime value
da732bc When network name or PAN ID is changed authenticator updates MAC keys

git-subtree-dir: features/nanostack/sal-stack-nanostack
git-subtree-split: b3fe574
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.

6 participants