Bcm63381b0 Firmware -
return 0;
gpio-leds compatible = "gpio-leds"; led_power label = "power"; gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>; ; ; ;
mips-linux-gnu-gcc -mips32r2 -msoft-float -G 0 -c minimal.c mips-linux-gnu-ld -T cfe.ld -o minimal.elf minimal.o cfe-bin2bin minimal.elf minimal.bin Then load via CFE prompt: bcm63381b0 firmware
// minimal.c - for BCM63381B0 bare-metal (CFE environment) #include <stdio.h> #include <cfe_api.h> // GPIO base address - you need BCM63381 datasheet for exact address #define GPIO_BASE 0x18000000 // example only, not real #define GPIO_DIR (GPIO_BASE + 0x00) #define GPIO_DATA (GPIO_BASE + 0x08)
// bcm63381_demo.dts /dts-v1/; #include "bcm63xx.dtsi" / model = "My BCM63381 Board"; compatible = "mycompany,bcm63381", "brcm,bcm63381"; gpio-leds compatible = "gpio-leds"
void gpio_init() = (1 << 5); (volatile unsigned int )GPIO_DIR = dir;
Example: a minimal C program to blink an LED via GPIO. led_power label = "power"
memory@0 device_type = "memory"; reg = <0x0 0x4000000>; // 64 MB ;
void gpio_set(int on) = (1 << 5); else data &= ~(1 << 5); (volatile unsigned int )GPIO_DATA = data;
