Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12600 Discussions

Programming bootROM through USB Blaster II?

Altera_Forum
Honored Contributor II
1,823 Views

This may be odd, but I'm fairly new to Altera technology. 

 

I'm used to creating firmware with AVR32 placing programs into internal Flash of the MCU, 

and I was wondering if there was an equivalent method for doing the same thing with  

the on-chip bootROM of the Altera SoC? 

 

Can we load our programs into bootROM through the USB Blaster II like Atmel allows with their line of boards? 

 

None of the Altera software is working on my computers, so I'm trying to create a sort of compiler that 

will read and write to hardware registers directly using a constant pointer like this: 

# define SDR_CTRLCFG (*(volatile uint32_t * const) 0xFFC25000) 

 

But for each register per component. 

 

The exact board I have is here: http://www.embest-tech.com/shop/star/lark-board.html 

 

But none of the companies are offering tech support, not even the manufacturer. 

 

In all, I have 20 years of programming experience, and this is the first board I've come across that I can't program. 

 

They didn't even include any bare metal or user space examples files so programming has to occur in pure binary. 

 

This board is going to fail miserably in the marketplace since they don't want people to program their boards. 

 

At $800 a board, people should just stick with Atmel boards, they too use ARM Cortex at hundreds of dollars less.  

 

It is currently useless in it current unprogrammed state without having a way to program firmware or binary programs on it. 

 

Here's picture of a screenshot showing the SDRAM registers, it's going to be a chore to figure out the order they're written in. 

 

 

http://www.alteraforum.com/forum/attachment.php?attachmentid=10112&stc=1
0 Kudos
8 Replies
Altera_Forum
Honored Contributor II
697 Views

 

--- Quote Start ---  

I'm fairly new to Altera technology. 

 

--- Quote End ---  

 

Sorry your initial experience sucks, though its not Altera's fault, its Larkboard's fault ... and yours a little bit for not doing your homework before buying it :) 

 

I'd noticed Element14 promoting the Lark board, but I did not see any details on a "golden reference design" and the like, so I did not spend anymore time looking at it. Most importantly, I did not see any developers posting patches on the U-Boot mailing list. The Altera developers have been posting patches for their boards, the Arrow SoCKit board, and the Denx MCV boards. 

 

The first thing to understand/appreciate is that the Altera SoCs are new devices, and so you'll have to experience a little pain to get started. 

 

Altera have put their SoC support onto a site called RocketBoards.org 

 

http://www.rocketboards.org/ 

 

Here's the Lark board page (but no reference design); 

 

http://www.rocketboards.org/foswiki/documentation/embestsoclarkevaluationboard 

 

I have the Arrow SoCKit, but have not had an opportunity to use it yet. That board and the Terasic boards are cheaper than the main Altera kit, and they have support on the RocketBoards site. 

 

If you have to get an SoC working ASAP for real work, then you may want to consider putting the Lark board aside, getting an SoCKit, getting that to work, and then going back to the Lark board once you are comfortable with the tools. If you're just "playing" with the Lark board, then by all means beat yourself up and get it working. In the end you'll be an SoC expert :) 

 

 

--- Quote Start ---  

 

I'm used to creating firmware with AVR32 placing programs into internal Flash of the MCU, and I was wondering if there was an equivalent method for doing the same thing with the on-chip bootROM of the Altera SoC? 

 

--- Quote End ---  

 

FPGAs and SoCs can boot from a variety of external memory, or you can download them via a JTAG cable. This is similar to how AVRs work, so it'll feel similar to you. 

 

 

--- Quote Start ---  

 

Can we load our programs into bootROM through the USB Blaster II like Atmel allows with their line of boards? 

 

--- Quote End ---  

 

Yes. 

 

 

--- Quote Start ---  

 

None of the Altera software is working on my computers 

 

--- Quote End ---  

 

Details? I have Quartus working under Windows XP, Windows 7, and Centos 7 (real machines and VirtualBox virtual machines). These are all supported platforms. 

 

 

--- Quote Start ---  

 

The exact board I have is here: http://www.embest-tech.com/shop/star/lark-board.html 

 

But none of the companies are offering tech support, not even the manufacturer. 

 

--- Quote End ---  

 

Seriously? That is crazy. 

 

 

--- Quote Start ---  

 

In all, I have 20 years of programming experience, and this is the first board I've come across that I can't program. 

 

--- Quote End ---  

 

You can program it. You've got not figured out how yet, be patient :) 

 

 

--- Quote Start ---  

 

They didn't even include any bare metal or user space examples files so programming has to occur in pure binary. 

 

This board is going to fail miserably in the marketplace since they don't want people to program their boards. 

 

--- Quote End ---  

 

I agree. 

 

 

--- Quote Start ---  

 

At $800 a board, people should just stick with Atmel boards, they too use ARM Cortex at hundreds of dollars less.  

 

--- Quote End ---  

 

This is a valid observation. If you just need a processor, then a BeagleBone or SAM board is definitely a cheaper and "easier" option. 

 

 

--- Quote Start ---  

 

It is currently useless in it current unprogrammed state without having a way to program firmware or binary programs on it. 

 

Here's picture of a screenshot showing the SDRAM registers, it's going to be a chore to figure out the order they're written in. 

 

--- Quote End ---  

 

Actually, it should not really be that hard. The SDRAM registers are specific to the SoC, not to the Lark board. 

 

Chances are a "bare metal" design for one of the other boards would work with the Lark board. 

 

I find it hard to believe that there are no reference designs for the Lark board though. Who have you talked to? Embest? Element14? If you purchased the board from Element14 or Farnell, then talk to one of their Field Application Engineers (FAEs). Its their job to make sure you are a satisfied customer, so they should be able to get you a reference design. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
697 Views

Thanks for your response, they selected me to test run the board, but they didn't hand me a development environment or board-specific example files for bare metal or user space development. 

 

I started creating a compiler because Altera software isn't working on any of my computers so I'm having to program this board in binary. 

 

I noticed the internal HPS components were addressable in the memory map, but there's no way to know the hardware addresses for the external hardware. 

 

I'll try to initialize the SDRAM, load a binary into the SDRAM but have some type of firmware interpret byte code to try to process commands in real time. 

 

If I can read and write directly to hardware, it would be an amazing system. Not sure about setting up FPGA from HPS, but I think that occurs 4 bytes at a time. 

 

I tried asking Embest, Altera and Element 14 for a bit of assistance, but Altera told me not to contact them if I needed further assistance, Embest kept pointing to DS-5 Alter Edition but that software isn't working on my Dell or Intel machines. I've tried XP, Win 7 Win 8, Debian Linux. 

 

I'd say people should stick with Atmel SAM based boards. Those are also based on Cortex A/M series, and Atmel Studio allows firmware programming over USB where Altera seems to forbid that until they extort $1,000 from you to give you right to program in binary. 

 

At $800 a board, the price of the board should include the right to program it. The manufacturer should have also created a compiler for their board. Without knowing how to program it, it's impossible. It'll take about 2 months to finish this compiler. I doubt it is really worth the time or effort to program because I wasn't handed the correct toolz to put the board to use.
0 Kudos
Altera_Forum
Honored Contributor II
697 Views

There's no technical documentation on the board other than DS-5/Quartus II alphanumeric pin names, I've checked everywhere. They just don't want people to program this board in binary. Nothing describes which external component is on what HPS/FPGA port. There are 9 ports for custom external hardware that are configured with 5 bits each but not sure which IC is on which of those ports. 

 

The only way to program this board is to make a Cyclone V compiler that works writing to correct memory locations. 

 

Open Source Cyclone V compiler that works, here we come. I'll make it able to read and write to all memory locations including HPS2FPGA and FPGA2HPS. 

 

But then it would be up to the developer to create drivers to operate external hardware. This will take a couple months.
0 Kudos
Altera_Forum
Honored Contributor II
697 Views

 

--- Quote Start ---  

 

they selected me to test run the board 

 

--- Quote End ---  

 

Who? 

 

If you have a schematic of the board, then you should be able to do anything you like. Without a schematic, you're in trouble. 

 

I'm not sure why you are talking about writing a compiler. You do not need to write one; the ARM GCC compiler tools should work fine. The information you need is the memory map (or device tree). The Altera Quartus tool is needed to first define your SoC system (combination of hard processor system plus non-FPGA pin mux/functions) and your FPGA logic. Somewhere in that process the tools generate a device tree (or something that can be converted into a device tree). Using that, you should be able to boot U-boot to initialize the hardware, and then boot Linux. The Altera SoC postings on the U-Boot mailing list indicate there is some level of "generic" board support, so the Lark board might be able to boot a simple image. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
697 Views

Right, there's no schematic for the board. I downloaded the set of files Embest had as part of their custom hardware library, but they hand you 50,000 files for hardware that aren't pertinent to the board, ranging from 1992 to about 2010, and could not find any files that related to examples showing how to use the features of the board. 

 

They do not have a board-specific library. They just included files that are meant for other hardware like x86, AMD, and for technologies the board doesn't even use like PCMCIA, SATA, IDE. 

 

I just assume not to mess with the board, I have to move on to other projects. I spent the past 3 weeks downloading about 20 GB of Altera development environments that don't even run on any of my machines. There's no way to program this board, so I'll just have to give a bad review on it. 

 

Honestly, the manufacturer should have thought this one through. They should have made a compiler of their own for their board, and they should have created a board-specific library to support the hardware features of the components of their board.  

 

Taking another look, they didn't include a BPS, just a bunch of useless software created in the 90's for hardware that probably doesn't exist anymore. They were even brave enough to include Atmel software for Atmel components that the board doesn't use, like DAC's and DataFlash. Those aren't even on the Lark Board.
0 Kudos
Altera_Forum
Honored Contributor II
697 Views

 

--- Quote Start ---  

Right, there's no schematic for the board. 

 

--- Quote End ---  

 

Then its not worth wasting your time. 

 

 

--- Quote Start ---  

 

I just assume not to mess with the board, I have to move on to other projects. 

 

--- Quote End ---  

 

I have to agree that its not worth wasting your time at the moment ... 

 

 

--- Quote Start ---  

 

I'll just have to give a bad review on it. 

 

--- Quote End ---  

 

Try and be constructive, i.e., something like "I give this board a FAIL because it does not ship with a schematic or board-support-package. I will revise this review if someone can provide me those details." 

 

 

--- Quote Start ---  

 

Honestly, the manufacturer should have thought this one through. 

 

--- Quote End ---  

 

Yes, send an email directly to Embest and complain. 

 

 

--- Quote Start ---  

 

They should have made a compiler of their own for their board, and they should have created a board-specific library to support the hardware features of the components of their board.  

 

--- Quote End ---  

 

You're using the slightly wrong terminology here. The thing they are missing is the board-support-package (BSP). 

 

I agree, you need to scream loudly, but constructively :) 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
697 Views

I believe if they created a development environment with board-specific libraries to support their line of boards as is used for Atmel's line of boards in Atmel Studio, then this company would have an excellent product. Currently, from my experience, they don't want anyone to program the board freely. 

 

Not sure why, it's an evaluation board, they should let us evaluate it. Funny there's nothing to evaluate since it can not be programmed. 

 

Cheers, I'll just stick with AVR32.
0 Kudos
Altera_Forum
Honored Contributor II
697 Views

 

--- Quote Start ---  

I believe if they created a development environment with board-specific libraries to support their line of boards as is used for Atmel's line of boards in Atmel Studio, then this company would have an excellent product. Currently, from my experience, they don't want anyone to program the board freely. 

 

Not sure why, it's an evaluation board, they should let us evaluate it. Funny there's nothing to evaluate since it can not be programmed. 

 

--- Quote End ---  

 

I agree that Embest has made a poor choice in releasing this board with insufficient support. 

 

 

--- Quote Start ---  

 

I'll just stick with AVR32. 

--- Quote End ---  

 

If AVR32 does what you need, then there is no need for an FPGA. 

 

Cheers, 

Dave
0 Kudos
Reply