-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2519e55
commit 462099f
Showing
8 changed files
with
70 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# To build this project, run these commands: | ||
# Build the Debug version | ||
mkdir -p build-debug && cd build-debug && cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=EFR32BG1.cmake .. && make | ||
cd .. | ||
# | ||
# Build the release version | ||
mkdir -p build-release && cd build-release && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=EFR32BG1.cmake .. && make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# To build this project, run these commands: | ||
mkdir -p build-debug && cd build-debug && cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=EFR32BG1.cmake .. && make | ||
cd .. | ||
# | ||
mkdir -p build-release && cd build-release && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=EFR32BG1.cmake .. && make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# To build this project, run these commands: | ||
mkdir -p build-debug && cd build-debug && cmake -DCMAKE_BUILD_TYPE=Debug .. && make | ||
cd .. | ||
# | ||
mkdir -p build-release && cd build-release && cmake -DCMAKE_BUILD_TYPE=Release .. && make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// | ||
// Created by Clyde Stubbs on 4/4/17. | ||
// | ||
|
||
#include "elf.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// | ||
// Created by Clyde Stubbs on 4/4/17. | ||
// | ||
|
||
#ifndef UTILS_ELF_H | ||
#define UTILS_ELF_H | ||
|
||
typedef struct { | ||
uint8 magic[4]; | ||
uint8 wordsize; // 1 = 32bit, 2 = 64 bit | ||
uint8 endianness; // 1 == little, 2 = big | ||
uint8 elfVer; // 1 | ||
uint8 system; | ||
uint8 abiversion; | ||
uint8 pad[7]; | ||
uint8 type[2]; | ||
uint8 isa[2]; // arm = 0x28 | ||
uint8 elfVer2[4]; | ||
uint8 entry[4]; | ||
uint8 phoff[4]; | ||
uint8 shoff[4]; | ||
uint8 flags[4]; | ||
uint8 ehsize[2]; | ||
uint8 phentsize[2]; | ||
uint8 phnum[2]; | ||
uint8 shentsize[2]; | ||
uint8 shnum[2]; | ||
uint8 shstrndx[2]; | ||
|
||
} elf_file_header; | ||
|
||
typedef struct { | ||
uint8 type[4]; // 1 = LOAD | ||
uint8 offset[4]; | ||
uint8 vaddr[4]; | ||
uint8 paddr[4]; | ||
uint8 filesz[4]; | ||
uint8 memsz[4]; | ||
uint8 flags[4]; | ||
uint8 align[4]; | ||
} elf_program_header; | ||
#endif //UTILS_ELF_H |