This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I have a RM46 HDK and wanted to try the LwIP demo code, so I created the project using the 2.0.0 version, made the change from RMII to MII, and tried it, and it does not work. So I tried the 3.0.0 version, made the same updates, followed the directions carefully, and still nothing transmitted or received. I even tried static IP addresses instead of DHCP, and still nothing. I have switch S2 seet for Ethernet and for USB (so I can get UART data) but not for USB Host.
What can be wrong? Does this example not just work out of the box? Are there other things I should be checking? I see a single Transmit interrupt, which comes in after the gratuitous ARP is sent out, but I never see any receive interrupts.
I guess the issue isn't that I could make changes to the board, but that the demo code is supposed to "just work", and it doesn't. I am trying to use this demo application to see if I can use ethernet on this part on the eventual boards that my company intends to build, and if I can't make the canned, stable and released demos from TI work, on the standard, released and supported demo board, what confidence can I have in some board my company is going to make? I am left to suggest to them that this processor is just not ready to be used.
So, again, I am looking for some idea on why the default, released demo code would not "just work" on the delivered HDK board, and what I can do to try and get it to work. Seems like a pretty simple problem.
Hi John,
Thanks for using our device! Just trying to make sure you're expectations for our (lack of) ability to support lwIP much are set right ;)
So I tried the RM48 example on my RM46 HDK without any mods and it worked fine.
What I did:
- install fresh halcogen / lwip demo lwIP_Demo_v03
- import into clean workspace the project 'Build-RM48'
- rebuild, download to board.. (changed emulator to XDS100v2 in CCXML file because I used the onboard USB)
- checked the xds100v2 UART connection as on COM13. Opened Putty to COM13 9600 N81
- ran the code after programming
- forgot the Switch for ETHERNET_ON so I flipped it, and pressed the warm reset button while the board was running in CCS.
Then on my browser:
Ok so I'm sure this isn't satisfactory as you will want to get to the point where you have a HalCoGen project specifically for the RM46 instead of the RM48..
But since it does work as-is please try it - that way we can make sure there isn't any issue on your local network between the PC and the board ... [because it looked like you'd already gotten pretty 'far' along..]
Best Regards
-Anthony
I love it when I can't get something to work that should, and everyone else has no problems! It means it is my fault somewhere and I have a prayer of fixing it!
The most notable thing is that I did "almost" the same thing, except I picked the RM46x folder instead of the RM48x folder, because I guess I thought I had a RM46L852 on this board, so naturally I used the one that had the same numbers.
However, I am nothing if not flexible. So, I will start over again, with a new run, a fresh install, and try the RM48x branch, and see what it does.
For the record, the code appears to be running just fine, but I am getting no packets in or out. Makes me think some setup has picked the wrong interface or something. I guess that is why I am grateful to have someone with the same board setup running this too, so I can believe it is my configuration that is bad, and not some great global conspiracy to drive me crazy.
I have a whole bunch of meetings on this board and project coming up, so it might take me until later this afternoon to try it, but I will send another email out as soon as I know something. Thanks for the help - if nothing else, this kind of help is what will keep me advocating for this part, even when I am having trouble.
John,
I got the example to work on the RM46 HDK with a HalCoGen project for RM46. There wasn't anything too tricky but I did forget
to enable the MDIO/MDCLK pins in the pinmux [they are not selected by checking MII], and then I forgot to enable interrupts for channels 77 & 79. Also when you enable interrupts you have to change the vector address for channels 77 and 79 from the default that HalCoGen puts to EMACCore0TxIsr for 77 and EMACCore0RxIsr for 79.
I can send you the whole project privately too if you want but I think you can just put in this HalCoGen folder in place of the one you have in the RM46 project. Then just change the include path to point to the HalCoGen include folder from this zip and you should be fine.
4130.lwip_rm46_hdk.zip
Well, there are 3 files, .ccsproject, .cproject, and .project which I imagine purport to control what the project contains. I have looked at these, and ccsproject has no differences (a drive letter change is all), project has no real changes (again, a drive letter change is all), and while cproject has a number of differences, they all appear to be compiler related, where you are using TMS470_5.0, and I am using TMS470_15.12 (really, 5.0.4 vs 15.12.1.LTS), but of course, since I don't HAVE 5.0.4, the build system swaps in 15.12.1.LTS anyway, so in reality, the 2 builds ARE using the same compiler!
There also is a makefile, at the top level of the Debug folder, but the only significant different there is that in the non-working side, a stack and heap size are referenced in the compiler options line (both set to 0x800). The order of some of the other options is slightly different, but otherwise the are all present, except for these 2. Is that significant? I tried turning it off, but there was no change in the working status - still no packets.
I kept looking, checking the properties tab on the project and such, and I eventually discovered a reference to "ORIGINAL_PARENT_LOC" for some include files, pointing back to the original LwIP directory. I updated these (not an easy thing it turns out) to be sure that all include files were coming from the sub-directories of the current project, did a clean build, and voila! It works.
Fragile. That is all I can say. Finding some of these dependencies is not easy, and changing them is not straight-forward. I guess that is a function of Eclipse.
One last thing - the original code has a commented out section that says
/* Uncomment the following if you'd like to assign a static IP address. Change address as required, and uncomment the previous statement. */
/*
uint8 ip_addr[4] = { 192, 168, 2, 44 };
uint8 netmask[4] = { 255, 255, 255, 0 };
uint8 gateway[4] = { 192, 168, 2, 254 };
but if I simply replace the 192.168 address with a real address, it comes out backwards. I suspect there needs to be a htonl() call before passing these values to lwIPInit(). Might be something to consider putting in a note in the code, or on the web page.
Very interesting John,
I've been chasing identical symptoms with both the 2.0 and 3.0 versions of the LwIP demo code, but on a TMS570LS12. I also get a single Tx interrupt, and no Rx interrupts. Poking around project properties, I don't see any reference to "ORIGINAL_PARENT_LOC"...what I have is:
If you don't mind, could you elaborate a bit on where you found the"ORIGINAL_PARENT_LOC" and what you did to fix them?
Thanks,
Chuck
I have written an article here on e2e a while ago on that example v3, and all the steps required to port it to another member of the Hercules family. It includes all HALCoGen and CCS steps (with the necessary build excludes), also MII switch and interrupt settings.
This is for the TMS570LC43 / RM57, but although PINMUX positions may be different, and clock settings will need a check, all config steps should be included.