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

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

Merged
merged 1 commit into from
Jul 17, 2017

Conversation

geky
Copy link
Contributor

@geky 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
Copy link
Contributor

adbridge commented Jul 7, 2017

LGTM

@adbridge
Copy link
Contributor

adbridge commented Jul 7, 2017

/morph test

*
* @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.
Copy link
Member

@pan- pan- Jul 7, 2017

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, nice catch 👍

@mbed-bot
Copy link

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!

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

0xc0170 commented Jul 10, 2017

/morph test

@mbed-bot
Copy link

Result: FAILURE

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

/morph test

Output

mbed Build Number: 759

Test failed!

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 11, 2017

/morph test

@mbed-bot
Copy link

Result: FAILURE

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

/morph test

Output

mbed Build Number: 787

Example Build failed!

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 13, 2017

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

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 13, 2017

/morph test

@mbed-bot
Copy link

Result: FAILURE

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

/morph test

Output

mbed Build Number: 802

Test failed!

@studavekar
Copy link
Contributor

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
Copy link
Contributor

theotherjimmy commented Jul 14, 2017

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

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 17, 2017

/morph test

@mbed-bot
Copy link

Result: SUCCESS

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

/morph test

Output

mbed Build Number: 818

All builds and test passed!

@theotherjimmy theotherjimmy merged commit 9cb9b9b into master Jul 17, 2017
@geky geky deleted the g-weak-note branch September 5, 2017 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants