I wrote this script for my led to blink . It is connected to MIO47 .
#include <stdio.h> #include "platform.h" #include "xil_printf.h" #include "xgpiops.h" #include "xparameters.h" XGpioPs led; XGpioPs_Config *led_config; void init(){ int status; led_config = XGpioPs_LookupConfig(XPAR_PS7_GPIO_0_DEVICE_ID); status = XGpioPs_CfgInitialize(&led, led_config, led_config->BaseAddr); if(status == XST_SUCCESS) xil_printf("Device Init Successful\n"); else xil_printf("Device Init Failed\n"); } int main() { init_platform(); init(); xil_printf("Starting GPIO MIO LED TEST\n"); XGpioPs_SetDirectionPin(&led, 47, 1); XGpioPs_SetOutputEnablePin(&led, 47, 1); while(1){ XGpioPs_WritePin(&led, 47, 1); sleep(1); XGpioPs_WritePin(&led, 47, 0); sleep(1); } cleanup_platform(); return 0; }
It doesn't blink neither it shows any errors .
I then went on to check if i can print hello world even . It doesn't even display that . Can someone help ?
Tried connecting different COM ports and all . But still no luck