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

Toolchain: Add a note about weak functions and header files #4718

Merged
merged 1 commit into from Jul 17, 2017

Conversation

Projects
None yet
7 participants
@geky
Member

geky commented Jul 6, 2017

The subtlety of where to mark functions as weak created an issue for at least one user, so added a warning in the documentation.

cc @marcuschangarm

@adbridge

This comment has been minimized.

Contributor

adbridge commented Jul 7, 2017

LGTM

@adbridge adbridge added the needs: CI label Jul 7, 2017

@adbridge

This comment has been minimized.

Contributor

adbridge commented Jul 7, 2017

/morph test

platform/mbed_toolchain.h Outdated
*
* @note
* Functions should only be marked as weak in the source file. The header file
* should contain a regular function definition to insure the function is emitted.

This comment has been minimized.

@pan-

pan- Jul 7, 2017

Member

declaration instead of definition ?
It is the definition site which as to be marked as weak, not the declaration site.

This comment has been minimized.

@geky

geky Jul 7, 2017

Member

Ah, nice catch 👍

@mbed-bot

This comment has been minimized.

mbed-bot commented Jul 7, 2017

Result: SUCCESS

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

/morph test

Output

mbed Build Number: 745

All builds and test passed!

Toolchain: Added a note about weak functions and header files
The subtlety of where to mark functions as weak created an issue for
at least one user, so added a warning in the documentation.

@geky geky force-pushed the g-weak-note branch to eb4c223 Jul 7, 2017

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Jul 10, 2017

/morph test

@mbed-bot

This comment has been minimized.

mbed-bot commented Jul 11, 2017

Result: FAILURE

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

/morph test

Output

mbed Build Number: 759

Test failed!

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Jul 11, 2017

/morph test

@mbed-bot

This comment has been minimized.

mbed-bot commented Jul 12, 2017

Result: FAILURE

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

/morph test

Output

mbed Build Number: 787

Example Build failed!

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Jul 13, 2017

@studavekar F429 for IAR one example keeps failing , CI results 2 days ago.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Jul 13, 2017

/morph test

@mbed-bot

This comment has been minimized.

mbed-bot commented Jul 13, 2017

Result: FAILURE

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

/morph test

Output

mbed Build Number: 802

Test failed!

@studavekar

This comment has been minimized.

Collaborator

studavekar commented Jul 14, 2017

@0xc0170 from logs looks like compile fails and tools raised an exception.

19:16:41 [DEBUG] Compile: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\arm\bin\iasmarm --cpu Cortex-M4F -DTRANSACTION_QUEUE_SIZE_SPI=2 -D__CORTEX_M4 -DUSB_STM_HAL -DARM_MATH_CM4 -D__FPU_PRESENT=1 -DUSBHOST_OTHER -D__MBED_CMSIS_RTOS_CM -D__CMSIS_RTOS -f .\BUILD\NUCLEO_F429ZI\IAR\.includes_cbca0c8e1454f47ce87e3d83bfd0ebfb.txt -o .\BUILD\NUCLEO_F429ZI\IAR\mbed-os\rtos\rtx5\TARGET_CORTEX_M\TARGET_RTOS_M4_M7\TOOLCHAIN_IAR\irq_cm4f.o .\mbed-os\rtos\rtx5\TARGET_CORTEX_M\TARGET_RTOS_M4_M7\TOOLCHAIN_IAR\irq_cm4f.S
19:16:41 [DEBUG] Return: 3
19:16:42 Traceback (most recent call last):
19:16:42   File "C:\mj\workspace\bm_wrap\870\examples\mbed-os-example-mesh-minimal\mbed-os\tools\make.py", line 280, in <module>
19:16:42     toolchain))
19:16:42   File "C:\mj\workspace\bm_wrap\870\examples\mbed-os-example-mesh-minimal\mbed-os\tools\build_api.py", line 536, in build_project
19:16:42     objects = toolchain.compile_sources(resources, resources.inc_dirs)
19:16:42   File "C:\mj\workspace\bm_wrap\870\examples\mbed-os-example-mesh-minimal\mbed-os\tools\toolchains\__init__.py", line 909, in compile_sources
19:16:42     return self.compile_queue(queue, objects)
19:16:42   File "C:\mj\workspace\bm_wrap\870\examples\mbed-os-example-mesh-minimal\mbed-os\tools\toolchains\__init__.py", line 972, in compile_queue
19:16:42     raise ToolException(err)
19:16:42 ToolException

Latest results shows test failure on NCS36510-IAR

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Jul 14, 2017

@studavekar That exception is just the assembler failing. It's not in addition to the assembler failing.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Jul 17, 2017

/morph test

@mbed-bot

This comment has been minimized.

mbed-bot commented Jul 17, 2017

Result: SUCCESS

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

/morph test

Output

mbed Build Number: 818

All builds and test passed!

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Jul 17, 2017

@theotherjimmy theotherjimmy merged commit 9cb9b9b into master Jul 17, 2017

5 checks passed

Cam-CI uvisor Build & Test Success
Details
ci/morph-test Job has completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@geky geky deleted the g-weak-note branch Sep 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment