CCS v5.5
SYSBIOS 6.37.05.35
NDK 2.24.01.18
NSP 1.10.02.09
XDCTOOLS 3.25.06.96
Code Gen Tools: v7.4.12
Custom board: C6748 DSP with 128Mbytes of DDR2. Using DP83848M Ethernet PHY connected via MII.
Step #1: I open Properties for my SYSBIOS project and go to the RTSC tab. From there I check the boxes for NDK 2.24.01.18 and NSP 1.10.02.09. I hit OK to save the changes and close the Properties window.
Step #2: Here is where the confusion starts. The NDK Getting Started Guide is way out of date. It uses CCS v3.3 and NDK 1.9xxx. Trying to follow the steps from this document leads to more questions than answers. The NDK Getting Started Guide needs to be updated or deleted from the list of documents to reference when trying to get the NDK working.
Step #3: The next logical place for information would be the NDK Users Guide v2.24. Section 1.6.1 in this guide (Adding NDK Support to an Existing Application) is exactly what I need. I open the *.cfg file and add the NDK -> Global item. I save the new *.cfg file and attempt to rebuild my project. No surprise, I have errors with unresolved symbols.
Step #4: Section 1.6.2 in the NDK User guide has Troubleshooting build errors. Perfect. Step two recommends making sure I have a the NSP -> Emac module installed. Nothing has told me to do this yet, so I add that to the *.cfg file. There is nothing to configure for the Emac module, so I attempt another build. No surprise, I have errors. I even have more errors than from the previous step.
Step #5: The next step from Section 1.6.2 says that if I need the Emac module (exactly how do I know if I need it or not?), I should copy the emacHooks.c file from one of the NSP examples into your project. Which example project? Does is matter? Rolling the dice, I copy emacHooks.c from the ndk_evm6748_elf_helloWorld project and attempt another build. I still get errors, but now I'm down to only one. It can't open "netmain.h".
Step #6: Back to section 1.6.2 and its last troubleshooting tip. It says I need to add a #include path to my project. It says I should right click on the project and select Build Options. There is no such option. However, there is Show Build Settings, so I try that. I add the path "c:\CCSv5\ndk_2_24_01_18\packages\ti\ndk\inc" and attempt another build. Success, no build errors.
Step #7: Before I even attempt to configure the NDK for use, what exactly have I built so far? I grabbed a file (emacHooks.c) from a NSP directory that was for the EVM6748. I'm not running on the EVM6748, I have my own custom hardware. How does the code know what PHY I have? How does it know what GPIO pin is controlling the RESET on the PHY? How does it know if the PHY is connected in MII vs RMII? This is where I am stuck. Somewhere I have to configure or modify something specific to my hardware. What is that?