Skip to content

add support for Cortex-R devices #339

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
Aug 24, 2018
Merged

Conversation

japaric
Copy link
Member

@japaric japaric commented Aug 24, 2018

@japaric
Copy link
Member Author

japaric commented Aug 24, 2018

@alexcrichton could you publish a new release after this is merged? We need one to build rust-std components for the Cortex-R targets.

@japaric
Copy link
Member Author

japaric commented Aug 24, 2018

cc @kenkeiter

@@ -1672,6 +1691,9 @@ impl Build {
"sparc64-unknown-linux-gnu" => Some("sparc64-linux-gnu"),
"sparc64-unknown-netbsd" => Some("sparc64--netbsd"),
"sparcv9-sun-solaris" => Some("sparcv9-sun-solaris"),
"armebv7r-none-eabihf" => Some("arm-none-eabi"),

Choose a reason for hiding this comment

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

Is this correct? eb = big-endian in armeb . I use 'armeb-eabi' and not arm-none-eabi in this case (Linaro toolchain)

Copy link
Member Author

Choose a reason for hiding this comment

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

The arm-none-eabi-gcc toolchain can also generate big endian code but it needs the -mbig-endian flag. The latest commit addresses that.

$ arm-none-eabi-readelf -h ./target/armebv7r-none-eabihf/debug/build/foo-728ce1e8d146ec12/out/libfoo.a

File: ./target/armebv7r-none-eabihf/debug/build/foo-728ce1e8d146ec12/out/libfoo.a(foo.o)
ELF Header:
  Magic:   7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, big endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              REL (Relocatable file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0x0
  Start of program headers:          0 (bytes into file)
  Start of section headers:          1188 (bytes into file)
  Flags:                             0x5000000, Version5 EABI
  Size of this header:               52 (bytes)
  Size of program headers:           0 (bytes)
  Number of program headers:         0
  Size of section headers:           40 (bytes)
  Number of section headers:         22
  Section header string table index: 21
$ arm-none-eabi-readelf -h ./target/armv7r-none-eabi/debug/build/foo-728ce1e8d146ec12/out/libfoo.a

File: ./target/armv7r-none-eabi/debug/build/foo-728ce1e8d146ec12/out/libfoo.a(foo.o)
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              REL (Relocatable file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0x0
  Start of program headers:          0 (bytes into file)
  Start of section headers:          1168 (bytes into file)
  Flags:                             0x5000000, Version5 EABI
  Size of this header:               52 (bytes)
  Size of program headers:           0 (bytes)
  Number of program headers:         0
  Size of section headers:           40 (bytes)
  Number of section headers:         22
  Section header string table index: 21

@alexcrichton alexcrichton merged commit 1fcbe88 into rust-lang:master Aug 24, 2018
@alexcrichton
Copy link
Member

👍

@japaric japaric deleted the cortex-r branch August 24, 2018 17:11
@japaric
Copy link
Member Author

japaric commented Aug 24, 2018

@alexcrichton Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants