USB seems to init ok
This commit is contained in:
		@@ -27,8 +27,9 @@
 | 
			
		||||
#include "bsp/board.h"
 | 
			
		||||
#include "board.h"
 | 
			
		||||
 | 
			
		||||
#include "io.h"
 | 
			
		||||
#include "mmu.h"
 | 
			
		||||
#include "broadcom/io.h"
 | 
			
		||||
#include "broadcom/mmu.h"
 | 
			
		||||
#include "broadcom/vcmailbox.h"
 | 
			
		||||
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
// Forward USB interrupt events to TinyUSB IRQ Handler
 | 
			
		||||
@@ -46,9 +47,8 @@ void OTG_FS_IRQHandler(void)
 | 
			
		||||
// Board porting API
 | 
			
		||||
//--------------------------------------------------------------------+
 | 
			
		||||
 | 
			
		||||
void print(void) {
 | 
			
		||||
  const char* greeting2 = "hello from cm100\r\n";
 | 
			
		||||
  board_uart_write(greeting2, strlen(greeting2));
 | 
			
		||||
void print(const char* str) {
 | 
			
		||||
  board_uart_write(str, strlen(str));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void board_init(void)
 | 
			
		||||
@@ -83,7 +83,7 @@ void board_init(void)
 | 
			
		||||
  board_uart_write(greeting, strlen(greeting));
 | 
			
		||||
  // gpio_setPinOutputBool(24, false);
 | 
			
		||||
  // gpio_setPinOutputBool(25, true);
 | 
			
		||||
  print();
 | 
			
		||||
  // print();
 | 
			
		||||
  // gpio_setPinOutputBool(25, false);
 | 
			
		||||
  // while (true) {
 | 
			
		||||
  // // for (size_t i = 0; i < 5; i++) {
 | 
			
		||||
@@ -97,6 +97,12 @@ void board_init(void)
 | 
			
		||||
  //   gpio_setPinOutputBool(42, false);
 | 
			
		||||
  // }
 | 
			
		||||
  // while (1) uart_update();
 | 
			
		||||
 | 
			
		||||
  // Turn on USB peripheral.
 | 
			
		||||
  print("Turning on USB power\r\n");
 | 
			
		||||
 | 
			
		||||
  vcmailbox_set_power_state(VCMAILBOX_DEVICE_USB_HCD, true);
 | 
			
		||||
  print("USB power on\r\n");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void board_led_write(bool state)
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@ UF2_FAMILY_ID = 0x57755a57
 | 
			
		||||
 | 
			
		||||
include $(TOP)/$(BOARD_PATH)/board.mk
 | 
			
		||||
 | 
			
		||||
MCU_DIR = hw/mcu/broadcom/bcm2711
 | 
			
		||||
MCU_DIR = hw/mcu/broadcom
 | 
			
		||||
 | 
			
		||||
CC = clang
 | 
			
		||||
 | 
			
		||||
@@ -18,21 +18,23 @@ CFLAGS += \
 | 
			
		||||
 | 
			
		||||
SRC_C += \
 | 
			
		||||
	src/portable/broadcom/synopsys/dcd_synopsys.c \
 | 
			
		||||
	$(MCU_DIR)/interrupts.c \
 | 
			
		||||
	$(MCU_DIR)/io.c \
 | 
			
		||||
	$(MCU_DIR)/mmu.c
 | 
			
		||||
	$(MCU_DIR)/broadcom/interrupts.c \
 | 
			
		||||
	$(MCU_DIR)/broadcom/io.c \
 | 
			
		||||
	$(MCU_DIR)/broadcom/mmu.c \
 | 
			
		||||
	$(MCU_DIR)/broadcom/vcmailbox.c
 | 
			
		||||
 | 
			
		||||
CROSS_COMPILE = aarch64-none-elf-
 | 
			
		||||
 | 
			
		||||
SKIP_NANOLIB = 1
 | 
			
		||||
 | 
			
		||||
LD_FILE = $(MCU_DIR)/link.ld
 | 
			
		||||
LD_FILE = $(MCU_DIR)/broadcom/link.ld
 | 
			
		||||
 | 
			
		||||
INC += \
 | 
			
		||||
	$(TOP)/$(BOARD_PATH) \
 | 
			
		||||
	$(TOP)/$(MCU_DIR)
 | 
			
		||||
	$(TOP)/$(MCU_DIR) \
 | 
			
		||||
	$(TOP)/lib/CMSIS_5/CMSIS/Core_A/Include
 | 
			
		||||
 | 
			
		||||
SRC_S += $(MCU_DIR)/boot.S
 | 
			
		||||
SRC_S += $(MCU_DIR)/broadcom/boot.S
 | 
			
		||||
 | 
			
		||||
$(BUILD)/kernel8.img: $(BUILD)/$(PROJECT).elf
 | 
			
		||||
	$(OBJCOPY) -O binary $^ $@
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								hw/mcu/broadcom
									
									
									
									
									
										Submodule
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								hw/mcu/broadcom
									
									
									
									
									
										Submodule
									
								
							 Submodule hw/mcu/broadcom added at c24e8f6898
									
								
							
		Reference in New Issue
	
	Block a user