Skip to content

Commit 97150dd

Browse files
authored
Merge pull request #5 from flit/symbol_names
Change to Arm-standard symbol names
2 parents 6a2d515 + 9894a7b commit 97150dd

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

build.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ function sym {
1919

2020
cat <<EOF
2121
instructions: $(bin)
22-
pc_init: $(sym _algo_init)
23-
pc_uninit: $(sym _algo_uninit)
24-
pc_program_page: $(sym _algo_program_page)
25-
pc_erase_sector: $(sym _algo_erase_sector)
26-
pc_erase_all: $(sym _algo_erase_all)
27-
EOF
22+
pc_init: $(sym Init)
23+
pc_uninit: $(sym UnInit)
24+
pc_program_page: $(sym ProgramPage)
25+
pc_erase_sector: $(sym EraseSector)
26+
pc_erase_all: $(sym EraseChip)
27+
EOF

src/algo.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ macro_rules! algo {
3939

4040
#[no_mangle]
4141
#[link_section = ".entry"]
42-
pub unsafe extern "C" fn _algo_init(addr: u32, clock: u32, function: u32) -> u32 {
42+
pub unsafe extern "C" fn Init(addr: u32, clock: u32, function: u32) -> u32 {
4343
if _IS_INIT {
44-
_algo_uninit();
44+
UnInit();
4545
}
4646
_IS_INIT = true;
4747
match <$type as FlashAlgo>::new(addr, clock, function) {
@@ -55,7 +55,7 @@ macro_rules! algo {
5555
}
5656
#[no_mangle]
5757
#[link_section = ".entry"]
58-
pub unsafe extern "C" fn _algo_uninit() -> u32 {
58+
pub unsafe extern "C" fn UnInit() -> u32 {
5959
if !_IS_INIT {
6060
return 1;
6161
}
@@ -65,7 +65,7 @@ macro_rules! algo {
6565
}
6666
#[no_mangle]
6767
#[link_section = ".entry"]
68-
pub unsafe extern "C" fn _algo_erase_all() -> u32 {
68+
pub unsafe extern "C" fn EraseChip() -> u32 {
6969
if !_IS_INIT {
7070
return 1;
7171
}
@@ -77,7 +77,7 @@ macro_rules! algo {
7777
}
7878
#[no_mangle]
7979
#[link_section = ".entry"]
80-
pub unsafe extern "C" fn _algo_erase_sector(addr: u32) -> u32 {
80+
pub unsafe extern "C" fn EraseSector(addr: u32) -> u32 {
8181
if !_IS_INIT {
8282
return 1;
8383
}
@@ -89,7 +89,7 @@ macro_rules! algo {
8989
}
9090
#[no_mangle]
9191
#[link_section = ".entry"]
92-
pub unsafe extern "C" fn _algo_program_page(addr: u32, size: u32, data: *const u8) -> u32 {
92+
pub unsafe extern "C" fn ProgramPage(addr: u32, size: u32, data: *const u8) -> u32 {
9393
if !_IS_INIT {
9494
return 1;
9595
}

0 commit comments

Comments
 (0)