Quickly Adapting U-Boot to a Custom Board

int board_init(void) { 
/* arch number of AT91SAM9263EK-Board */ gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9263EK; /* adress of boot parameters */ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; #ifdef CONFIG_CMD_NAND at91sam9263ek_nand_hw_init(); #endif #ifdef CONFIG_HAS_DATAFLASH at91_set_pio_output(AT91_PIO_PORTE, 20, 1); /* select spi0 clock */ at91_spi0_hw_init(1 << 0); #endif #ifdef CONFIG_MACB at91sam9263ek_macb_hw_init(); #endif #ifdef CONFIG_USB_OHCI_NEW at91_uhp_hw_init(); #endif #ifdef CONFIG_LCD at91sam9263ek_lcd_hw_init(); #endif at91sam9263ek_custom_hw_init(); return 0; }
static void at91sam9263ek_custom_hw_init(void) { printf("Initializing Custom GPIOs...\n"); /* Configure LED_A to 0*/ at91_set_gpio_output(AT91_PIN_PC0, 0); /* Configure LED_B to 1*/ at91_set_gpio_output(AT91_PIN_PC7, 1); /* Configure PERIPHERAL_A to 0*/ at91_set_gpio_output(AT91_PIN_PC10, 0); }
$ export CROSS_COMPILE=/path/to/arm- $ make at91sam9263ek_norflash_boot_config $ make




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What is Flowchart in Programming? Symbols, Advantages, Preparation

Flowchart in Programming

The Google Design Interview

Setup server monitoring with Prometheus Node Exporter and Grafana on EC2

Meet the Experts: Carlos Mostek

Review List 4

Load test equipment at runtime in a Robot test suite

5 Secret DS/ML Python Modules Nobody Knows About

Unit test Retrofit2 response without Mockserver

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Gabriel Gonzalez

Gabriel Gonzalez

More from Medium

Begin your C# Game Development Journey Using This Challenge

Project 7: ESP 32 Bluetooth

Hello my peers , Hello readers !

C++ 3D Viewer Code with Explanations