Skip to content

cpu: refactor cortex cpu makefiles#2850

Closed
kaspar030 wants to merge 11 commits intoRIOT-OS:masterfrom
kaspar030:refactor_cortex_cpu
Closed

cpu: refactor cortex cpu makefiles#2850
kaspar030 wants to merge 11 commits intoRIOT-OS:masterfrom
kaspar030:refactor_cortex_cpu

Conversation

@kaspar030
Copy link
Copy Markdown
Contributor

Makefile, Makefile.include and syscalls.c were nearly identical for all cortex CPUs.

This PR unifies the Makefiles and factors newlib support into a module.

This affects the following boards, could you please test and then mark here?

  • airfy-beacon (nrf51822)
  • arduino-due (sam3x8e)
  • cc2538dk (cc2538)
  • f4vi1 (stm32f4)
  • fox (stm32f1)
  • iot-lab_M3 (stm32f1)
  • mbed_lpc1768 (lpc1768)
  • msbiot (stm32f4)
  • nucleo-f091 (stm32f0)
  • nucleo-f334 (stm32f3)
  • nucleo-l1 (stm32l1)
  • openmote (cc2538)
  • pca10000 (nrf51822)
  • pca10005 (nrf51822)
  • spark-core (stm32f1)
  • stm32f0discovery (stm32f0)
  • stm32f3discovery (stm32f3)
  • stm32f4discovery (stm32f4)
  • udoo (sam3x8e)
  • yunjia-nrf51822 (nrf51822)

@kaspar030 kaspar030 added the Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation label Apr 22, 2015
@kaspar030
Copy link
Copy Markdown
Contributor Author

(did not touch the kinetis MCUs as they have a different syscalls.c)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why do you declare newlib as pseudomodule?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Because syscalls.c has to be in front of the linker command line, and the newlib module's Makefile.include adds it there (through UNDEF). So in order not to add newlib.a again, I've added it to PSEUDOMODULES.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I see.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does it break anything if the .a file appears twice in the command line?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Don't think so.

I did this while debugging why this commit enlarges the binary (turned out to be the RIOT_VERSION string), but then I thought, it is not needed there, so why add it there.

You guys opt for not making this a pseudomodule?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I actually don't care.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I just asked out of interest. :) Make it a pseudomodule.

@haukepetersen
Copy link
Copy Markdown
Contributor

nice one! Will test some of the boards this afternoon

@kaspar030
Copy link
Copy Markdown
Contributor Author

Maybe testing once for #2852 is enough, if you guys ACK the principle?

@OlegHahm OlegHahm modified the milestone: Release 2015.06 Apr 29, 2015
@kaspar030
Copy link
Copy Markdown
Contributor Author

All testing is done on #2852, so I close this.

@kaspar030 kaspar030 closed this May 18, 2015
@kaspar030 kaspar030 deleted the refactor_cortex_cpu branch February 7, 2017 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants