Skip to content

Use the C Pre-Processor on GCC Linker scripts #3706

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 2 commits into from
Feb 9, 2017

Conversation

c1728p9
Copy link
Contributor

@c1728p9 c1728p9 commented Feb 7, 2017

This allows us to define parts of the linker script outside of the linker script itself. In particular, we are interested in restricting ROM to a subsection.

@c1728p9
Copy link
Contributor Author

c1728p9 commented Feb 7, 2017

/morph test

@c1728p9
Copy link
Contributor Author

c1728p9 commented Feb 7, 2017

@mbed-bot: TEST

HOST_OSES=ALL
BUILD_TOOLCHAINS=ALL
TARGETS=ALL

@mbed-bot
Copy link

mbed-bot commented Feb 7, 2017

Result: FAILURE

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

/morph test

Output

mbed Build Number: 1514

Build failed!

@mbed-bot
Copy link

mbed-bot commented Feb 7, 2017

[Build 1250]
SUCCESS: Building succeeded and tests were run! Be sure to check the test results

@sg- sg- added the needs: work label Feb 7, 2017
@sg-
Copy link
Contributor

sg- commented Feb 7, 2017

@c1728p9 looks like some build failures.

@theotherjimmy
Copy link
Contributor

I just did a spot check on some of those failures, and I could not reproduce them.

@theotherjimmy
Copy link
Contributor

/morph test

@mbed-bot
Copy link

mbed-bot commented Feb 7, 2017

Result: FAILURE

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

/morph test

Output

mbed Build Number: 1522

Build failed!

@bridadan
Copy link
Contributor

bridadan commented Feb 7, 2017

In order to reproduce the CI failures you may to enable the heap and stat stats:

mbed test --compile -DMBED_HEAP_STATS_ENABLED=1 -DMBED_STACK_STATS_ENABLED=1 ...

@theotherjimmy
Copy link
Contributor

Yes, I ran exactly that command line, copied from the CI logs

Copy link
Contributor

@bridadan bridadan left a comment

Choose a reason for hiding this comment

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

Some concerns over checking the result of the build worker, but everything else looks ok

@@ -2201,12 +2201,12 @@ def build_tests(tests, base_source_paths, build_path, target, toolchain_name,
report[target_name][toolchain_name][test_key] = report_entry[test_key]

# Set the overall result to a failure if a build failure occurred
if not worker_result['result'] and not isinstance(worker_result['reason'], NotSupportedException):
if 'reason' in worker_result and not isinstance(worker_result['reason'], NotSupportedException):
Copy link
Contributor

Choose a reason for hiding this comment

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

For this line I think you still need to have the not worker_result['result'] clause as well. So:

if 'reason' in worker_result and not worker_result['result'] and not isinstance(worker_result['reason'], NotSupportedException):

result = False
break

# Adding binary path to test build result
if worker_result['result'] and 'bin_file' in worker_result:
if 'result' in worker_result and 'bin_file' in worker_result:
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar thing here as above:

if 'result' in worker_result and worker_results['result'] and 'bin_file' in worker_result:

@c1728p9 c1728p9 changed the title Use the C Pre-Processor on GCC Linker scirpts Use the C Pre-Processor on GCC Linker scripts Feb 7, 2017
@bridadan
Copy link
Contributor

bridadan commented Feb 7, 2017

/morph test

@mbed-bot
Copy link

mbed-bot commented Feb 7, 2017

Result: FAILURE

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

/morph test

Output

mbed Build Number: 1523

Build failed!

@c1728p9
Copy link
Contributor Author

c1728p9 commented Feb 8, 2017

/morph test

@mbed-bot
Copy link

mbed-bot commented Feb 8, 2017

Result: SUCCESS

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

/morph test

Output

mbed Build Number: 1532

All builds and test passed!

@theotherjimmy
Copy link
Contributor

/morph export-bulid

This allows us to define parts of the linker script outside of the
linker script itself. In particular, we are interested in restricting
ROM to a subsection.
For toolchains that do not implicitly run the C pre-processor on their
linker scripts the toolchain is expected to define a `preproc`
attribute.  The Makefiles then pick up on this attribute and add another
rule for pre-processing the linker script automatically.
@theotherjimmy
Copy link
Contributor

Whoops. I goofed. Should be working again

@theotherjimmy
Copy link
Contributor

/morph test
/morph export-build

@theotherjimmy
Copy link
Contributor

Only one bot kick per comment it seems
/morph export-build

@mbed-bot
Copy link

mbed-bot commented Feb 9, 2017

Result: SUCCESS

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

/morph export-build

Output

mbed Build Number: 115

All exports and builds passed!

@mbed-bot
Copy link

mbed-bot commented Feb 9, 2017

Result: SUCCESS

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

/morph test
/morph export-build

Output

mbed Build Number: 1536

All builds and test passed!

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.

6 participants