-
Notifications
You must be signed in to change notification settings - Fork 3k
Move target specific macros to mbed_config.h #2347
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
Conversation
/morph export-build |
Result: FAILUREYour command has finished executing! Here's what you wrote!
|
Looks like I wasn't properly merged with master when making this patch. This commit: --preinclude for armasm as per infocenter is not valid. Maybe it is for a newer armasm, but uvision does not like it as assembler flag. I ran the export-build before and after this commit, and that is where it breaks. |
/morph export-build |
Result: FAILUREYour command has finished executing! Here's what you wrote!
|
I get what you're trying to do here, but conceptually, the config system doesn't know anything about toolchain macros (or about toolchains for that matter), it only deals with configuration data. While your fix would probably work, I find the idea of having toolchain macros listed in |
@bogdanm Do you think an option might be to export another header file to be preincluded? Some of the device properties seem to be well placed in a configuration file. However, I am not intimately familiar with the configuration system, so I don't know what the conceptual boundaries are. |
After reviewing this I think the path forward is:
|
@sg- The major implication I see for this is that if someone is writing their project in assembly (yikes) then they won't have access to the macros you mentioned. Though if they are writing their project in assembly, they're probably fine with this and they want all the control over what gets defined any way. It may also be possible to still get the macros and write assembly by using a .c file with inline assembly? May be a viable workaround... As long as this behavior is clearly documented in the config system's documentation in big, bold letters, this seems reasonable to me 👍 |
Moved here: #2377 |
Cc @AlessandroA. Are you guys happy with the solution proposed by @sg- above? To me, it looks like a preprocessed assembler source should see the same set of macros that a C/C++ source file sees, but maybe I'm just being paranoid. |
I agree with @bogdanm that the macros for preprocessed assembly files should be the same of the C/C++ files. It's not currently a requirement for uVisor, but I am confident these subtle differences in the build systems will eventually bite us. Whenever is possible, I'd opt for consistency. IIUC the limitation here is the |
The problem is:
In general and historically:
Is there a specific case I've not considered? I think the above behavior is pretty consistent. Just don't use a hammer to thread a needle. |
@sg- At the moment Commit 88564a9 removed those symbols for ASM compilation, introducing a regression in the uVisor app (see #2385). FEATURE, TOOLCHAIN and TARGET are extensively used in mbed OS to conditionally select code. I don't see a reason for creating an exception for ASM files ("the tool doesn't allow it" is not good enough IMO). If we agree that we need these symbols, then we can find other solutions (even a naive one — including a header at the beginning of the ASM files that need it). If you think we shouldn't use these symbols in code, then we should remove them altogether, not just from ASM files. |
This is what I thought originally that we're making too many assumptions about which macros are needed by the ASM code. The truth is that we can't know that in advance, so the only way to be sure that we're not messing things up is to make all macros available to ASM code, just like we do for C and C++ code. @sg- |
macros are macros, TARGET_ TOOLCHAIN_ and FEATURE_ are not (even though we've misled you to think they are :) These are used for an inclusion method to compile. If you've relied on these its easy enough to macros_add |
…..9a21668 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: 9a21668
…..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
…..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
Fixes ARMmbed/mbed-os-example-client#61. Prevents uvision armasm command from growing too long with -D defines for preprocessing.