- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello there People of the Altera forum!
Could anyone advise me on how to go about setting up php/mysql on the NIOS II Cyclone II development kit, I have the webserver running, but I would just like to know whether or not it is actually possible to have PHP installed or not. Also as I am kinda new to this, could anyone tell me how the html or even the index.html file gets generated please. I have a feeling as it is generated during compile time into the uncompress zip file, but I would just like to know where the html is kept and if its possible to edit the code after compile time. Thank you, MRbLink Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't think either mysql or php have been ported to the Nios platform, and IMHO it is a difficult task. Using Linux instead of uCOS might help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there Daixiwen,
Thank you for the reply. I have since decided to not try a php install in this project, no need to over complicate things. And I have no idea how to use linux - I have been using windows since 3.1 came out ;-p though linux is more stable, I am just simply stuck in my ways of a familiar GUI. For now I just need to put custom web content into the read only zip file and get that onto the flash device. Basically just some simple links & open & display text files etc on the screen, then possibly expand this to holding hex files for use in pic re-programming, whether this is possible or not though I am not sure, it's just a long term option that I am looking at for doing software upgrade's to IC's/MCU's over the internet or intranet from the Ethernet port. All good fun learning though! Any further advice or pointer's would be welcome. Cheers, MRb- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you start the web server, the bottom of the page has some hint for you to create your own web server.
In your project directory, there are a few interesting files - ReadMe.txt - ro_zipfs.zip - web_server.c/.h - http.c/.h - and all other *.c /*.h (1) ReadMe.txt Read the "ReadMe.txt" first, it has some text about this web_server project & little explain on each important c & h file. (2) ro_zipfs.zip It is just a zip file, without compression, consist of index.html, and several html pages and pictures. Modify it to suite your web page need, and zip it without compression. (3) web_server.c web_server.c is where the main() define (4) http.c http.c define the mapping from the web page HTML "POST" request to the actual function call in http.c Look at - "post_funcs" that define the mapping struct at http.c line 110, - "sweep_field" declaration that map HTML POST "/SWEEP" at http.c line 336 - and index.html method=post action="/SWEEP" declaration - The function that you need will be very similar to the "choose" & "upload" button and the program_flash.html in the zip file.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you have the NEEK board, there are a lot more interesting web_server project available on web.
Load web page from SD-Card formatted to "FAT" file system _www_.altera.com/support/examples/nios2/exm-micro_tutorial.html_ Web server With AJAX support _www_.nioswiki.com/ExampleDesigns_- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there Kee020041,
Thank you for such an informative post! Just what I needed to see ;-p I have spent majority of today trying to decipher the web_server.c, so this has helped a lot, I'll admit I'm kinda out of my depth here, but that's called learning I guess! Thanks for the links too, especially If I can go read/write It will make a lot of difference, I can't wait to have a mess with the AJAX stuff, I use that with some of the php/mysql stuff I do as a side project. Again, thanks for the advice, If I have any more issues/questions I will post again for help. Cheers, MRb- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Im trying to run the web server example on the DE2-115 using NIOS II IDE. I am changing the code according to my project. However, I need to know how to let the user change the switches (SW0-SW17) on the board, then make the changes appear on the web page when i open it such that the webpage is automatically refreshed to capture any changes in the switches. Any idea?! Help?! Thank you in advance!!!
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page