UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Scholar helmutforren
Scholar
10,240 Views
Registered: ‎06-23-2014

Trouble adding gpio to blink LED

Jump to solution

I've attached a zip of my project (too big? removed by system?).  I also have a version just prior to the most recent work.  Windows 7.  Avnet SP6LX16 dev kit.

 

I had a working project, then went to add a gpio to blink an LED.  From XPS, I added an xps_gpio and gave it a name of LED1.  I set up the ports and generated addresses.  I exported to the SDK.  Over in the SDK, I have a project built from hello world.  There's a platform.c.  I want to write code to initialize the gpio, but I discover an expected #define is missing. From other examples, I know it should be defined in xparameters.h.  But when I look at xparameters.h, it's not there.

 

Specifically, in xparameters.h I find a bunch of references to text "ADC_READY".  This is an xps_gpio that previously existed in the project.  Now I have another named "LED1", and I expect to find similar references to this text.  But I don't.  Furthermore, there's a #define for XPAR_ADC_READY_BASEADDR.  Why can't I find a #define for XPAR_LED1_BASEADDR?  From the SDK, I find Processor_hw_platform / system.xml which refers to led1.  I do find system.mss that refers to led1 but doesn't show a gpio driver for it as does the reference to adc_ready.  I think this is related to my problem.

 

What am I missing?  Did my export to SDK not properly connect up?  It did for ADC_READY when I first built this project from scratch.  Did I need to manually copy something?  My XPS is in a ...\8_BlinkLEDs\Processor folder, while the SDK is in a parallel ...8_BlinkLEDs\SDK folder.

0 Kudos
1 Solution

Accepted Solutions
Scholar helmutforren
Scholar
18,180 Views
Registered: ‎06-23-2014

Re: Trouble adding gpio to blink LED

Jump to solution

I found it in plain hidden sight.  MSS file is no longer in XPS, and I don't have one, and when I tried to put one into XPS it refused.  Instead, I find it in SDK (Project Explorer / Name_dsp / system.mss).  Double click on it.  That's were I saw led1 with no driver beside it.  Now I see button to "Modify this BSP's Settings".  Click it, navigate to Overview / drivers, see red "none" for led1 driver.  Click on it and choose gpio from dropdown box.  Tool automatically rebuilds something.  Now I view xparameters.h and find LED1.  Yippie!

View solution in original post

0 Kudos
2 Replies
Scholar helmutforren
Scholar
18,181 Views
Registered: ‎06-23-2014

Re: Trouble adding gpio to blink LED

Jump to solution

I found it in plain hidden sight.  MSS file is no longer in XPS, and I don't have one, and when I tried to put one into XPS it refused.  Instead, I find it in SDK (Project Explorer / Name_dsp / system.mss).  Double click on it.  That's were I saw led1 with no driver beside it.  Now I see button to "Modify this BSP's Settings".  Click it, navigate to Overview / drivers, see red "none" for led1 driver.  Click on it and choose gpio from dropdown box.  Tool automatically rebuilds something.  Now I view xparameters.h and find LED1.  Yippie!

View solution in original post

0 Kudos
Scholar helmutforren
Scholar
10,221 Views
Registered: ‎06-23-2014

Re: Trouble adding gpio to blink LED

Jump to solution

Oh my God!  The LED is blinking!  And it only took TWO WEEKS.  Movie attached.

 

I've been doing this **** for 39 years.  It shouldn't have taken two weeks get up to this creeping speed level.  Next, I need to get the DAC/ADC of the original 12.2 reference design working, now that I have *something* working in 14.7.  Then I'll be where I should have been after two days.

0 Kudos