sfjdhkahkfjhaf

stable
Penguin 3 years ago
parent 6a874d4c2d
commit 55f6cdb243

@ -1,21 +1,3 @@
s
s
n
p resp
p/x resp
s
s
q
q
tar ext /dev/ttyACM0
q
mon s
q
tar ext /dev/ttyS0
detach 1
detach
q
tar ext /dev/ttyS0
tar ext /dev/ttyS1
tar ext /dev/ttyS2
mon s
@ -254,3 +236,21 @@ q
break sd_mmc.c:306
c
q
break sd_mmc_init
c
n
n
n
n
s
n
n
s
s
n
n
n
n
finish
s
q

@ -43,14 +43,14 @@
"-I../shared/devices",
"-I../shared/util",
"-I../shared/drivers/impl",
"-MThal/utils/src/utils_syscalls.o",
"-MThpl/core/hpl_core_m4.o",
"-o",
"hal/utils/src/utils_syscalls.o",
"../hal/utils/src/utils_syscalls.c"
"hpl/core/hpl_core_m4.o",
"../hpl/core/hpl_core_m4.c"
],
"directory": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build",
"file": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/../hal/utils/src/utils_syscalls.c",
"output": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/hal/utils/src/utils_syscalls.o"
"file": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/../hpl/core/hpl_core_m4.c",
"output": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/hpl/core/hpl_core_m4.o"
},
{
"arguments": [
@ -96,14 +96,14 @@
"-I../shared/devices",
"-I../shared/util",
"-I../shared/drivers/impl",
"-MThpl/systick/hpl_systick.o",
"-MThal/utils/src/utils_syscalls.o",
"-o",
"hpl/systick/hpl_systick.o",
"../hpl/systick/hpl_systick.c"
"hal/utils/src/utils_syscalls.o",
"../hal/utils/src/utils_syscalls.c"
],
"directory": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build",
"file": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/../hpl/systick/hpl_systick.c",
"output": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/hpl/systick/hpl_systick.o"
"file": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/../hal/utils/src/utils_syscalls.c",
"output": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/hal/utils/src/utils_syscalls.o"
},
{
"arguments": [
@ -149,14 +149,14 @@
"-I../shared/devices",
"-I../shared/util",
"-I../shared/drivers/impl",
"-MThpl/core/hpl_core_m4.o",
"-MThpl/systick/hpl_systick.o",
"-o",
"hpl/core/hpl_core_m4.o",
"../hpl/core/hpl_core_m4.c"
"hpl/systick/hpl_systick.o",
"../hpl/systick/hpl_systick.c"
],
"directory": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build",
"file": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/../hpl/core/hpl_core_m4.c",
"output": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/hpl/core/hpl_core_m4.o"
"file": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/../hpl/systick/hpl_systick.c",
"output": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/hpl/systick/hpl_systick.o"
},
{
"arguments": [
@ -573,14 +573,14 @@
"-I../shared/devices",
"-I../shared/util",
"-I../shared/drivers/impl",
"-MThal/utils/src/utils_list.o",
"-MThpl/dmac/hpl_dmac.o",
"-o",
"hal/utils/src/utils_list.o",
"../hal/utils/src/utils_list.c"
"hpl/dmac/hpl_dmac.o",
"../hpl/dmac/hpl_dmac.c"
],
"directory": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build",
"file": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/../hal/utils/src/utils_list.c",
"output": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/hal/utils/src/utils_list.o"
"file": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/../hpl/dmac/hpl_dmac.c",
"output": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/hpl/dmac/hpl_dmac.o"
},
{
"arguments": [
@ -679,14 +679,14 @@
"-I../shared/devices",
"-I../shared/util",
"-I../shared/drivers/impl",
"-MThpl/dmac/hpl_dmac.o",
"-MThal/utils/src/utils_list.o",
"-o",
"hpl/dmac/hpl_dmac.o",
"../hpl/dmac/hpl_dmac.c"
"hal/utils/src/utils_list.o",
"../hal/utils/src/utils_list.c"
],
"directory": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build",
"file": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/../hpl/dmac/hpl_dmac.c",
"output": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/hpl/dmac/hpl_dmac.o"
"file": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/../hal/utils/src/utils_list.c",
"output": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/hal/utils/src/utils_list.o"
},
{
"arguments": [
@ -1050,14 +1050,14 @@
"-I../shared/devices",
"-I../shared/util",
"-I../shared/drivers/impl",
"-MTmain.o",
"-MThpl/osc32kctrl/hpl_osc32kctrl.o",
"-o",
"main.o",
"../main.c"
"hpl/osc32kctrl/hpl_osc32kctrl.o",
"../hpl/osc32kctrl/hpl_osc32kctrl.c"
],
"directory": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build",
"file": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/../main.c",
"output": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/main.o"
"file": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/../hpl/osc32kctrl/hpl_osc32kctrl.c",
"output": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/hpl/osc32kctrl/hpl_osc32kctrl.o"
},
{
"arguments": [
@ -1103,14 +1103,14 @@
"-I../shared/devices",
"-I../shared/util",
"-I../shared/drivers/impl",
"-MThpl/osc32kctrl/hpl_osc32kctrl.o",
"-MTmain.o",
"-o",
"hpl/osc32kctrl/hpl_osc32kctrl.o",
"../hpl/osc32kctrl/hpl_osc32kctrl.c"
"main.o",
"../main.c"
],
"directory": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build",
"file": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/../hpl/osc32kctrl/hpl_osc32kctrl.c",
"output": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/hpl/osc32kctrl/hpl_osc32kctrl.o"
"file": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/../main.c",
"output": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/main.o"
},
{
"arguments": [
@ -1262,14 +1262,14 @@
"-I../shared/devices",
"-I../shared/util",
"-I../shared/drivers/impl",
"-MThpl/sercom/hpl_sercom.o",
"-MThal/src/hal_gpio.o",
"-o",
"hpl/sercom/hpl_sercom.o",
"../hpl/sercom/hpl_sercom.c"
"hal/src/hal_gpio.o",
"../hal/src/hal_gpio.c"
],
"directory": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build",
"file": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/../hpl/sercom/hpl_sercom.c",
"output": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/hpl/sercom/hpl_sercom.o"
"file": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/../hal/src/hal_gpio.c",
"output": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/hal/src/hal_gpio.o"
},
{
"arguments": [
@ -1315,14 +1315,14 @@
"-I../shared/devices",
"-I../shared/util",
"-I../shared/drivers/impl",
"-MThal/src/hal_gpio.o",
"-MThpl/sercom/hpl_sercom.o",
"-o",
"hal/src/hal_gpio.o",
"../hal/src/hal_gpio.c"
"hpl/sercom/hpl_sercom.o",
"../hpl/sercom/hpl_sercom.c"
],
"directory": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build",
"file": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/../hal/src/hal_gpio.c",
"output": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/hal/src/hal_gpio.o"
"file": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/../hpl/sercom/hpl_sercom.c",
"output": "/storage/Shared/Documents/Projects/spi_sd_mmc_lib/build/hpl/sercom/hpl_sercom.o"
},
{
"arguments": [

@ -2937,3 +2937,324 @@ Note: automatically using hardware breakpoints for read-only addresses.
Breakpoint 1, main () at ../main.c:7
7 atmel_start_init();
─── Assembly ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
0x000007f6 main+10 ldr r3, [pc, #20] ; (0x80c <main+32>)
0x000007f8 main+12 ldr r0, [pc, #20] ; (0x810 <main+36>)
0x000007fa main+14 blx r3
0x000007fc main+16 ldr r3, [pc, #20] ; (0x814 <main+40>)
0x000007fe main+18 blx r3
0x00000800 main+20 b.n 0x800 <main+20>
0x00000802 main+22 nop
0x00000804 main+24 lsrs r1, r0, #23
0x00000806 main+26 movs r0, r0
0x00000808 main+28 lsrs r1, r5, #24
─── Breakpoints ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Expressions ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── History ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Memory ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Registers ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
r0 0x00000000 r1 0x0000000a r2 0x41008000 r3 0x10000000 r4 0x1ffffffd r5 0x00000006
r6 0x00000ef1 r7 0x00000ed9 r8 0x00000f09 r9 0x00000f91 r10 0x00000eb1 r11 0xaf9faffe
r12 0x0000000a sp 0x200100d0 lr 0x00001163 pc 0x00000800 xpsr 0x61000000 fpscr 0x00000000
msp 0x200100d0 psp 0xfff3df7c primask 0x00 basepri 0x00 faultmask 0x00 control 0x00
─── Source ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 5 {
 6 /* Initializes MCU, drivers and middleware */
 7 atmel_start_init();
 8 pdebug_init();
 9
10 printf("Hi\n");
11
12 sd_mmc_init();
13 /* Replace with your application code */
14 while (1) {
15 }
16 }
~
~
~
~
~
~
~
~
─── Stack ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[0] from 0x00000800 in main+20 at ../main.c:15
─── Threads ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[1] id 0 from 0x00000800 in main+20 at ../main.c:15
─── Variables ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
main () at ../main.c:15
15 }
Breakpoint 1 at 0x7ec: file ../main.c, line 7.
Loading section .text, size 0x20b0 lma 0x0
Loading section .relocate, size 0x64 lma 0x20b0
Start address 0x0, load size 8468
Transfer rate: 45 KB/sec, 846 bytes/write.
─── Output/messages ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Note: automatically using hardware breakpoints for read-only addresses.
─── Assembly ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
~
~
~
~
~
!0x000007ec main+0 push {r3, lr}
0x000007ee main+2 ldr r3, [pc, #20] ; (0x804 <main+24>)
0x000007f0 main+4 blx r3
0x000007f2 main+6 ldr r3, [pc, #20] ; (0x808 <main+28>)
0x000007f4 main+8 blx r3
─── Breakpoints ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[1] break at 0x000007ec in ../main.c:7 for main hit 1 time
─── Expressions ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── History ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Memory ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Registers ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
r0 0x20000064 r1 0x00000000 r2 0x00f00000 r3 0x000007ed r4 0x1ffffffd r5 0x00000006
r6 0x00000ef1 r7 0x00000ed9 r8 0x00000f09 r9 0x00000f91 r10 0x00000eb1 r11 0xaf9faffe
r12 0x0000000a sp 0x200100d8 lr 0x000007bd pc 0x000007ec xpsr 0x61000000 fpscr 0x00000000
msp 0x200100d8 psp 0xfff3df7c primask 0x00 basepri 0x00 faultmask 0x00 control 0x00
─── Source ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
~
~
~
~
 1 #include <atmel_start.h>
 2 #include "pdebug.h"
 3 #include "sd_mmc.h"
 4 int main(void)
 5 {
 6 /* Initializes MCU, drivers and middleware */
! 7 atmel_start_init();
 8 pdebug_init();
 9
10 printf("Hi\n");
11
12 sd_mmc_init();
13 /* Replace with your application code */
14 while (1) {
15 }
16 }
─── Stack ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[0] from 0x000007ec in main+0 at ../main.c:7
─── Threads ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[1] id -1 from 0x000007ec in main+0 at ../main.c:7
─── Variables ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Breakpoint 1, main () at ../main.c:7
7 atmel_start_init();
─── Assembly ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
0x000007f6 main+10 ldr r3, [pc, #20] ; (0x80c <main+32>)
0x000007f8 main+12 ldr r0, [pc, #20] ; (0x810 <main+36>)
0x000007fa main+14 blx r3
0x000007fc main+16 ldr r3, [pc, #20] ; (0x814 <main+40>)
0x000007fe main+18 blx r3
0x00000800 main+20 b.n 0x800 <main+20>
0x00000802 main+22 nop
0x00000804 main+24 lsrs r1, r0, #23
0x00000806 main+26 movs r0, r0
0x00000808 main+28 lsrs r1, r5, #24
─── Breakpoints ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Expressions ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── History ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Memory ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Registers ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
r0 0x00000006 r1 0x0000000a r2 0x000000f1 r3 0x000005b1 r4 0x1ffffffd r5 0x00000006
r6 0x00000ef1 r7 0x00000ed9 r8 0x00000f09 r9 0x00000f91 r10 0x00000eb1 r11 0xaf9faffe
r12 0x0000000a sp 0x200100d0 lr 0x00001225 pc 0x00000800 xpsr 0x21000000 fpscr 0x00000000
msp 0x200100d0 psp 0xfff3df7c primask 0x00 basepri 0x00 faultmask 0x00 control 0x00
─── Source ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 5 {
 6 /* Initializes MCU, drivers and middleware */
 7 atmel_start_init();
 8 pdebug_init();
 9
10 printf("Hi\n");
11
12 sd_mmc_init();
13 /* Replace with your application code */
14 while (1) {
15 }
16 }
~
~
~
~
~
~
~
~
─── Stack ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[0] from 0x00000800 in main+20 at ../main.c:15
─── Threads ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[1] id 0 from 0x00000800 in main+20 at ../main.c:15
─── Variables ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
main () at ../main.c:15
15 }
Breakpoint 1 at 0x7ec: file ../main.c, line 7.
Loading section .text, size 0x20b0 lma 0x0
Loading section .relocate, size 0x64 lma 0x20b0
Start address 0x0, load size 8468
Transfer rate: 45 KB/sec, 846 bytes/write.
─── Output/messages ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Note: automatically using hardware breakpoints for read-only addresses.
─── Assembly ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
~
~
~
~
~
!0x000007ec main+0 push {r3, lr}
0x000007ee main+2 ldr r3, [pc, #20] ; (0x804 <main+24>)
0x000007f0 main+4 blx r3
0x000007f2 main+6 ldr r3, [pc, #20] ; (0x808 <main+28>)
0x000007f4 main+8 blx r3
─── Breakpoints ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[1] break at 0x000007ec in ../main.c:7 for main hit 1 time
─── Expressions ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── History ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Memory ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Registers ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
r0 0x20000064 r1 0x00000000 r2 0x00f00000 r3 0x000007ed r4 0x1ffffffd r5 0x00000006
r6 0x00000ef1 r7 0x00000ed9 r8 0x00000f09 r9 0x00000f91 r10 0x00000eb1 r11 0xaf9faffe
r12 0x0000000a sp 0x200100d8 lr 0x000007bd pc 0x000007ec xpsr 0x61000000 fpscr 0x00000000
msp 0x200100d8 psp 0xfff3df7c primask 0x00 basepri 0x00 faultmask 0x00 control 0x00
─── Source ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
~
~
~
~
 1 #include <atmel_start.h>
 2 #include "pdebug.h"
 3 #include "sd_mmc.h"
 4 int main(void)
 5 {
 6 /* Initializes MCU, drivers and middleware */
! 7 atmel_start_init();
 8 pdebug_init();
 9
10 printf("Hi\n");
11
12 sd_mmc_init();
13 /* Replace with your application code */
14 while (1) {
15 }
16 }
─── Stack ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[0] from 0x000007ec in main+0 at ../main.c:7
─── Threads ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[1] id -1 from 0x000007ec in main+0 at ../main.c:7
─── Variables ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Breakpoint 1, main () at ../main.c:7
7 atmel_start_init();
─── Assembly ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
0x000007f6 main+10 ldr r3, [pc, #20] ; (0x80c <main+32>)
0x000007f8 main+12 ldr r0, [pc, #20] ; (0x810 <main+36>)
0x000007fa main+14 blx r3
0x000007fc main+16 ldr r3, [pc, #20] ; (0x814 <main+40>)
0x000007fe main+18 blx r3
0x00000800 main+20 b.n 0x800 <main+20>
0x00000802 main+22 nop
0x00000804 main+24 lsrs r1, r0, #23
0x00000806 main+26 movs r0, r0
0x00000808 main+28 lsrs r1, r5, #24
─── Breakpoints ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Expressions ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── History ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Memory ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Registers ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
r0 0x00000006 r1 0x0000000a r2 0x000000f1 r3 0x000005b1 r4 0x1ffffffd r5 0x00000f95
r6 0x00000fc1 r7 0x00000fed r8 0x00000eb1 r9 0x00000f91 r10 0x00000eb1 r11 0xaf9faffe
r12 0x0000000a sp 0x200100d0 lr 0x00001225 pc 0x00000800 xpsr 0x21000000 fpscr 0x00000000
msp 0x200100d0 psp 0xfff3df7c primask 0x00 basepri 0x00 faultmask 0x00 control 0x00
─── Source ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 5 {
 6 /* Initializes MCU, drivers and middleware */
 7 atmel_start_init();
 8 pdebug_init();
 9
10 printf("Hi\n");
11
12 sd_mmc_init();
13 /* Replace with your application code */
14 while (1) {
15 }
16 }
~
~
~
~
~
~
~
~
─── Stack ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[0] from 0x00000800 in main+20 at ../main.c:15
─── Threads ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[1] id 0 from 0x00000800 in main+20 at ../main.c:15
─── Variables ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
main () at ../main.c:15
15 }
Breakpoint 1 at 0x7ec: file ../main.c, line 7.
Loading section .text, size 0x2130 lma 0x0
Loading section .relocate, size 0x64 lma 0x2130
Start address 0x0, load size 8596
Transfer rate: 46 KB/sec, 859 bytes/write.
─── Output/messages ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Note: automatically using hardware breakpoints for read-only addresses.
─── Assembly ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
~
~
~
~
~
!0x000007ec main+0 push {r3, lr}
0x000007ee main+2 ldr r3, [pc, #20] ; (0x804 <main+24>)
0x000007f0 main+4 blx r3
0x000007f2 main+6 ldr r3, [pc, #20] ; (0x808 <main+28>)
0x000007f4 main+8 blx r3
─── Breakpoints ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[1] break at 0x000007ec in ../main.c:7 for main hit 1 time
─── Expressions ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── History ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Memory ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Registers ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
r0 0x20000064 r1 0x00000000 r2 0x00f00000 r3 0x000007ed r4 0x1ffffffd r5 0x00000f95
r6 0x00000fc1 r7 0x00000fed r8 0x00000eb1 r9 0x00000f91 r10 0x00000eb1 r11 0xaf9faffe
r12 0x0000000a sp 0x200100d8 lr 0x000007bd pc 0x000007ec xpsr 0x61000000 fpscr 0x00000000
msp 0x200100d8 psp 0xfff3df7c primask 0x00 basepri 0x00 faultmask 0x00 control 0x00
─── Source ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
~
~
~
~
 1 #include <atmel_start.h>
 2 #include "pdebug.h"
 3 #include "sd_mmc.h"
 4 int main(void)
 5 {
 6 /* Initializes MCU, drivers and middleware */
! 7 atmel_start_init();
 8 pdebug_init();
 9
10 printf("Hi\n");
11
12 sd_mmc_init();
13 /* Replace with your application code */
14 while (1) {
15 }
16 }
─── Stack ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[0] from 0x000007ec in main+0 at ../main.c:7
─── Threads ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[1] id -1 from 0x000007ec in main+0 at ../main.c:7
─── Variables ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Breakpoint 1, main () at ../main.c:7
7 atmel_start_init();

@ -73,7 +73,10 @@ sd_mmc_err_t sd_mmc_deselect(uint8_t slot)
{
UNUSED(slot);
sd_mmc_err_t ret = SD_MMC_SUCCESS;
uint8_t dummy = 0xFF;
SD_MMC_INTF_WRITE(&dummy, 1);
SD_MMC_INTF_DESELECT_DEVICE();
SD_MMC_INTF_WRITE(&dummy, 1);
return ret;
}
sd_mmc_err_t sd_mmc_select(uint8_t slot, uint32_t clock, uint8_t bus_width, bool high_speed)
@ -83,7 +86,10 @@ sd_mmc_err_t sd_mmc_select(uint8_t slot, uint32_t clock, uint8_t bus_width, bool
UNUSED(bus_width);
UNUSED(high_speed);
sd_mmc_err_t ret = SD_MMC_SUCCESS;
uint8_t dummy = 0xFF;
SD_MMC_INTF_WRITE(&dummy, 1);
SD_MMC_INTF_SELECT_DEVICE();
SD_MMC_INTF_WRITE(&dummy, 1);
return ret;
}
@ -133,13 +139,15 @@ sd_mmc_err_t sd_mmc_read_res7(uint8_t* res7)
ret = SD_MMC_ERR_COMM;
break;
}
/* if(res7[0] > 1) */
/* { */
/* // handle this error better later */
/* ret = SD_MMC_ERR_COMM; */
/* break; */
/* } */
printf("hi");
if(res7[0] > 1)
{
// handle this error better later
printf("res7: 0x%02x\n", res7[0]);
perr("res7 > 1...");
ret = SD_MMC_ERR_COMM;
break;
}
}while(0);
return ret;
}
@ -149,19 +157,18 @@ sd_mmc_err_t sd_mmc_read_res3(uint8_t* res3)
sd_mmc_err_t ret = SD_MMC_SUCCESS;
do
{
SD_MMC_INTF_READ(res3, 1);
if(5 != SD_MMC_INTF_READ(res3, 5))
{
ret = SD_MMC_ERR_COMM;
break;
}
/* if(res3[0] > 1) */
/* { */
/* // handle this error better later */
/* ret = SD_MMC_ERR_COMM; */
/* break; */
/* } */
if(res3[0] > 1)
{
// handle this error better later
ret = SD_MMC_ERR_COMM;
break;
}
}while(0);
return ret;
@ -305,7 +312,7 @@ void sd_mmc_print_res1(uint8_t res)
void sd_mmc_print_res7(const uint8_t* const res)
{
sd_mmc_print_res1(res[0]);
/* if(res[0] > 1) return; */
if(res[0] > 1) return;
printf("\tCommand Version: 0x%02x\n", CMD_VER(res[1]));
@ -320,7 +327,7 @@ void sd_mmc_print_res7(const uint8_t* const res)
void sd_mmc_print_res3(const uint8_t* const res)
{
sd_mmc_print_res1(res[0]);
/* if(res[0] > 1) return; */
if(res[0] > 1) return;
printf("\tCard Power Up Status: 0x%02x\n", res[1]);
if(POWER_UP_STATUS(res[1]))

@ -43,3 +43,10 @@ void passert(const bool cond, const char* msg_failure, const char* file, const i
for(;;){}
}
}
int _perr(const char* str, const char* file, int line)
{
return printf("P_ERR >>> %s:%d -- %s\n",
file,
line,
str);
}

@ -8,11 +8,16 @@ int pdebug_init(void);
int pprintf(const char* fmt, ...);
void passert(const bool cond, const char* msg_failure, const char* file, const int line);
int _perr(const char* str, const char* file, int line);
#ifdef DEBUG
#define assert(cond_, f_) passert(cond_, f_, __FILE__, __LINE__)
#define printf(f_, ...) pprintf((f_), ##__VA_ARGS__)
#define perr(f_) _perr(f_, __FILE__, __LINE__)
#else
#define printf(f_, ...) void(f_, ...)
#define assert(cond_, f_) void(cond_, f_)
#define perr(f_) void(f_, __FILE__, __LINE__)
#endif
#endif

Loading…
Cancel
Save