USBD_API_INIT_PARAM_T usb_param = { .usb_reg_base = LPC_USB0_BASE, .max_num_ep = USB_MAX_EP_NUM, .mem_base = USB_STACK_MEM_BASE, .mem_size = USB_STACK_MEM_SIZE, }; |
(gdb) print/x *stack $1 = {R0 = 0x9b4, R1 = 0x9ec, R2 = 0x9b4, R3 = 0x10000000, R12 = 0xfffffe00, LR = 0x3ab, PC = 0x800, xPSR = {b = {ISR = 0x0, _reserved0 = 0x0, T = 0x0, IT = 0x0, Q = 0x0, V = 0x0, C = 0x0, Z = 0x0, N = 0x1}, w = 0x80000000}} |
/* USB Initialization */ ret = USBD_API->hw->Init(&g_hUsb, &desc, &usb_param); 39a: 4b11 ldr r3, [pc, #68] ; (3e0 <main+0xc4>) 39c: 681b ldr r3, [r3, #0] 39e: 681b ldr r3, [r3, #0] 3a0: 685b ldr r3, [r3, #4] 3a2: aa05 add r2, sp, #20 3a4: 4669 mov r1, sp 3a6: 4813 ldr r0, [pc, #76] ; (3f4 <main+0xd8>) 3a8: 4798 blx r3 if (ret == LPC_OK) { 3aa: 2800 cmp r0, #0 3ac: d113 bne.n 3d6 <main+0xba> |