FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
148 views 0 comments
by anonymous

Hi,

I have fully installed the SDK for the RUT955/956 as Legacy and new 7.x release. That is working!

I prepared a new package "hello" like "teltonika-snmpd" and put that into the Makefile chain. That is working, too!

But I wonder if it couldn't be easier to build just a simple source for the mips target with the SDK toolchain.

Let's say I have a simple hello.c

#include <stdio.h>

int main() {
    printf("Hello, World!\n");
    return 0;
}

What would be the simplest and easiest call to generate the build as:

./build_dir/target-mips_34kc_uClibc-0.9.33.2/hello

Thanks for any hint on that to speed up our development.

P.S.: I am looking for a CLI call like:

./staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/gcc ... hello.c -o hello

1 Answer

0 votes
by anonymous

Well after reading this:

https://community.teltonika-networks.com/49974/trb140-sdk-simple-hello-world

and this:

https://openwrt.org/inbox/eclipse

I just used:

# Download and extract the SDK for your device into current working dir

./scripts/feeds update -a

make

STAGING_DIR=$(pwd)/staging_dir ./staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-gcc ./src/hello.c -o ./hello

And that works!

If I miss something, please leave some feedback.