Skip to content

Commit

Permalink
Merge pull request #83 from maxgerhardt/master
Browse files Browse the repository at this point in the history
Hotfix linker error
  • Loading branch information
Heltec-Aaron-Lee authored Jul 14, 2022
2 parents fc3ebf4 + 571b96f commit 91c609f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
25 changes: 19 additions & 6 deletions src/Mcu.S
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ _ZN8McuClass15setSPIFrequencyEj:
.literal .LC8, SPI
.align 4
.global _ZN8McuClass14singleTransferEth
.literal .newsingleTransfer, _ZN8McuClass14singleTransferEth
.type _ZN8McuClass14singleTransferEth, @function
_ZN8McuClass14singleTransferEth:
.LFB2454:
Expand Down Expand Up @@ -267,6 +268,11 @@ _ZN8McuClass14singleTransferEth:
.section .text._ZN8McuClass12readRegisterEt,"ax",@progbits
.align 4
.global _ZN8McuClass12readRegisterEt
.literal .newReadRegister, _ZN8McuClass12readRegisterEt

.global vsnprintf
.literal .newvsnprintf, vsnprintf

.type _ZN8McuClass12readRegisterEt, @function
_ZN8McuClass12readRegisterEt:
.LFB2452:
Expand All @@ -278,7 +284,8 @@ _ZN8McuClass12readRegisterEt:
movi.n a12, 0
extui a11, a3, 0, 7
mov.n a10, a2
call8 _ZN8McuClass14singleTransferEth
l32r a8, .newsingleTransfer
callx8 a8
.LVL25:
.loc 1 384 0
mov.n a2, a10
Expand All @@ -289,6 +296,7 @@ _ZN8McuClass12readRegisterEt:
.section .text._ZN8McuClass13writeRegisterEth,"ax",@progbits
.align 4
.global _ZN8McuClass13writeRegisterEth
.literal .newWriteRegister, _ZN8McuClass13writeRegisterEth
.type _ZN8McuClass13writeRegisterEth, @function
_ZN8McuClass13writeRegisterEth:
.LFB2453:
Expand All @@ -303,7 +311,8 @@ _ZN8McuClass13writeRegisterEth:
extui a12, a4, 0, 8
or a11, a11, a8
mov.n a10, a2
call8 _ZN8McuClass14singleTransferEth
l32r a8, .newsingleTransfer
callx8 a8
.LVL28:
retw.n
.LFE2453:
Expand Down Expand Up @@ -448,7 +457,8 @@ write0:
l32r a10, .LC13
extui a12, a3, 0, 8
extui a11, a2, 0, 16
call8 _ZN8McuClass13writeRegisterEth
l32r a8, .newWriteRegister
callx8 a8
.LVL53:
retw.n
.LFE2457:
Expand All @@ -468,7 +478,8 @@ read0:
.loc 1 438 0
l32r a10, .LC14
extui a11, a2, 0, 16
call8 _ZN8McuClass12readRegisterEt
l32r a8, .newReadRegister
callx8 a8
.LVL55:
.loc 1 439 0
mov.n a2, a10
Expand Down Expand Up @@ -1461,7 +1472,8 @@ lora_printf:
s32i.n a13, sp, 48
s32i.n a15, sp, 56
.loc 1 449 0
call8 vsnprintf
l32r a8, .newvsnprintf
callx8 a8
.LVL170:
.loc 1 451 0
movi.n a8, 0x3f
Expand All @@ -1488,7 +1500,8 @@ lora_printf:
mov.n a12, a2
mov.n a11, a4
mov.n a10, a3
call8 vsnprintf
l32r a8, .newvsnprintf
callx8 a8
.LVL175:
.loc 1 458 0
mov.n a12, a10
Expand Down
10 changes: 7 additions & 3 deletions src/rtc-board.S
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ TimerGetAdjustedTimeoutValue:
.LFE21:
.size TimerGetAdjustedTimeoutValue, .-TimerGetAdjustedTimeoutValue
.global __udivdi3
.literal .newudivdi3, __udivdi3
.section .text.TimerGetTimerValue,"ax",@progbits
.literal_position
.literal .LC2, TimeSwitch
Expand Down Expand Up @@ -87,7 +88,8 @@ TimerGetTimerValue:
l32r a2, .LC5
movi.n a13, 0
and a12, a12, a2
call8 __udivdi3
l32r a8, .newudivdi3
callx8 a8
.LVL5:
.loc 1 96 0
mov.n a2, a10
Expand Down Expand Up @@ -219,7 +221,8 @@ TimerGetElapsedAlarmTime:
l32r a11, .LC19+4
and a12, a12, a8
movi.n a13, 0
call8 __udivdi3
l32r a8, .newudivdi3
callx8 a8
.LVL16:
sub a8, a10, a2
movi.n a2, 1
Expand Down Expand Up @@ -322,7 +325,8 @@ TimerComputeElapsedTime:
l32r a11, .LC23+4
and a12, a12, a8
movi.n a13, 0
call8 __udivdi3
l32r a8, .newudivdi3
callx8 a8
.LVL30:
sub a2, a10, a2
.LVL31:
Expand Down

0 comments on commit 91c609f

Please sign in to comment.