[Solved] OpenWrt Crosscompile with some form of IDE

I have been searching internet for 2 days to find an IDE for Linux programming with Crosscompile support for OpenWrt. Now it may sound stupid but I have not been able to find anything at all that may work with some form of proper Intellisense.

I have tried VS Code and Eclipse so far but there seems to be something missing or I am not probably doing it right. I come from Windows environment so I have only used Visual Studio to date and it works quite well.

In both VS Code and Eclipse in Linux, they try to use the current Linux kernel OS to fetch files/stuff and I am not sure how to say to them to use specific folder from OpenWrt build that I have compiled already. The main thing is that I want to create a kernel module driver for a Wifi device and every time I create a .c file it complains that there is no int main() function but in every example I found on the internet there is no main function there. Even the Linux documentation suggests to use #include <linux/init.h> but in VS Code and Eclipse there is no file with that name.

My target architecture is mips_24kc and I have compiled the toolchain from v18.06.4 sources. Now can someone please guide me in a proper direction on how to configure things for the first time? I am dual booting my Laptop with Linux and Windows 10. I have only used C# language in the past but I do have some basic knowledge for C++ but I want to learn about Linux programming so please be elaborate. Thank you

You can get the SDK for any supported device at downloads.openwrt.org

It will be located at the bottom of the same page you discover its official firmware.

No compiling/code needed for the environment - only for the software you wish to build.

Also see: https://openwrt.org/docs/guide-developer/crosscompile

I still have one issue unresolved which is the IDE. Which IDE should I use that provides some form of intellisense for Linux and how do I configure it to use the SDK properly. Most of the Linux developers must use some form of IDE because they may not remember all the functions there are in the kernel. So any IDE which can help me easily compile the code as well as write it.

I'm confused, are you asking for a GUI Integrated Development Environment?

My experience is with C and C++ on the SDK doing Cross Compile of said code - maybe someone else can chime in.

I’ve never found any usable IDE for kernel work. It’s further complicated by the extensive patching that OpenWrt does to resolve issues, backport enhancements, and tailor the kernel to all-in-one routers.

I use https://elixir.bootlin.com/linux/latest/source as a reference for the Linux sources.


Got some success using Eclipse as IDE for OpenWrt.
At least it is possible to to debug u-boot using J-Link debugger and develop/debug user applications using onboard gdb server:
IDE for openwrt
Main trick is using build_dir folder as Eclipse project's source.
Going to try it with kernel soon.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.