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

Only link in LPC17xx ethernet ISR as needed #4112

Merged
merged 1 commit into from Apr 6, 2017

Conversation

Projects
None yet
4 participants
@adamgreen
Contributor

adamgreen commented Apr 4, 2017

Originally the LPC17xx ethernet ISR would be linked in to all mbed-os based
firmware because it was named ENET_IRQHandler() so that it would be
automatically placed in the FLASH image's interrupt vector table. This
meant that programs which made no use of the lwIP stack still pulled in
this ISR.

This commit changes the name of the routine so that the ISR isn't
automatically placed in the interrupt vector table at link time but is
instead dynamically placed in the interrupt vector table at runtime
when the lwIP stack is initialized. Now the ethernet ISR is only linked
in when it is actually needed.

Example arm-none-eabi-size output for a simple LED blinking program
showing the before and after size results:
text data bss dec hex filename
13208 148 7784 21140 5294 LPC1768/HelloWorld.elf

text data bss dec hex filename
12700 148 7468 20316 4f5c LPC1768/HelloWorld.elf

Only link in LPC17xx ethernet ISR as needed
Originally the ethernet ISR would be linked in to all mbed-os based
firmware because it was named ENET_IRQHandler() so that it would be
automatically placed in the FLASH image's interrupt vector table. This
meant that programs which made no use of the lwIP stack still pulled in
this ISR.

This commit changes the name of the routine so that the ISR isn't
automatically placed in the interrupt vector table at link time but is
instead dynamically placed in the interrupt vector table at runtime
when the lwIP stack is initialized. Now the ethernet ISR is only linked
in when it is actually needed.

Example arm-none-eabi-size output for a simple LED blinking program
showing the before and after size results:
   text	   data	    bss	    dec	    hex	filename
  13208	    148	   7784	  21140	   5294	LPC1768/HelloWorld.elf

   text	   data	    bss	    dec	    hex	filename
  12700	    148	   7468	  20316	   4f5c	LPC1768/HelloWorld.elf

@adamgreen adamgreen force-pushed the adamgreen:fixLpc17xxEthernetIsrAlwaysLinkedIn branch to be0bab3 Apr 4, 2017

@0xc0170

0xc0170 approved these changes Apr 5, 2017

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Apr 5, 2017

/morph test

@0xc0170 0xc0170 added the needs: CI label Apr 5, 2017

@mbed-bot

This comment has been minimized.

mbed-bot commented Apr 5, 2017

Result: SUCCESS

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

/morph test

Output

mbed Build Number: 1832

All builds and test passed!

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Apr 5, 2017

/morph test-nightly

@mbed-bot

This comment has been minimized.

mbed-bot commented Apr 5, 2017

Result: FAILURE

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

/morph test-nightly

Output

mbed Build Number: 1837

Build Prep failed!

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Apr 5, 2017

/morph test-nightly

@mbed-bot

This comment has been minimized.

mbed-bot commented Apr 5, 2017

Result: SUCCESS

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

/morph test-nightly

Output

mbed Build Number: 1840

All builds and test passed!

@sg- sg- added ready for merge and removed needs: CI labels Apr 6, 2017

@sg- sg- merged commit 8af190f into ARMmbed:master Apr 6, 2017

5 checks passed

Cam-CI uvisor Build & Test Success
Details
ci/morph-test Job has completed
Details
ci/morph-test-nightly 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
@adamgreen

This comment has been minimized.

Contributor

adamgreen commented Apr 7, 2017

Thanks!

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