Permission error with Gradle on Travis CI

What happened?

I was setting up the continuous integration for a project that used Gradle as build tool on Travis CI.

The first build failed due to a repeated permission denied error running the gradlew wrapper file.

The important part it’s the following:

$ ./gradlew assemble
/home/travis/ line 179: ./gradlew: Permission denied

The command “eval ./gradlew assemble” failed. Retrying, 2 of 3.

/home/travis/ line 179: ./gradlew: Permission denied

The command “eval ./gradlew assemble” failed. Retrying, 3 of 3.

/home/travis/ line 179: ./gradlew: Permission denied

The command “eval ./gradlew assemble” failed 3 times.

The solution

Obviously the first thing to do is searching on google about the problem.

This lead me to this stackoverflow answer, from wich I used the second solution proposed.

Basically the problem is due to the fact that the the gradlew wrapper file it’s not set as executable.

I liked more the solution of adding a before_install call to chmod +x on the file in question.

So from this .travis.yml

I just ended up with:

Which is fine.



Long time, no see.. It’s been a very busy year to say the least.

I always liked to solve problems, to write code and experiment with stuff, so as you do, I developed some personal projects to try out new things.

I usually develop in Java, using Apache Maven as my build and dependency management tool, in my spare time and at my job too. I’ve noticed that I usually keep my general purpose utilities classes under packages like *.utils or *.helper.

This led to a lot of copy-pasted code all over the place. A lot of methods were also untested. I couldn’t even be bothered to look inside the other projects if there was already what I needed, so I ended up re-writing already existent stuff, that’s for sure.

I finally decided that I’m done with this mess.

I started a project called utils, and I choose that it should be open source and available under the BSD 3-Clause License.

The source code is hosted on GitHub and I put the project under continuous integration testing with a service called Travis CI. I use another service called Codacy that provides automated code analysis. I also discovered another service called JitPack looking around for a quick way to share my artifacts online. The home page of JitPack reads “Easy to use package repository for Git” and I can say that’s really great! It uses maven as the build tool, provides artifacts for sources/javadoc and it’s integrated with GitHub release system (just tag your code on git and you’re good to go basically, artifacts are online usually the order of seconds).

All this services are free for open source and it’s a great technological stack to write good code, check them out.

Here’s what i’ve setup for the project:

utils is open source and in development so, of course suggestions, critics, contributions and whatever are welcome.

A lot of stuff learned!

I’ve been playing around a lot with the Stellaris Launchpad board, looking around the stuff I never noticed that the besides the fact of being licensed with a BSD style license, the Stellarisware SW provided by Texas Instruments has a closed license for the various examples.

The basic files needed to create a program for the board, and basically for all the ARM processors are the following with binutils and gcc:

  • The program you want contained in a .c file.
  • A linker script due to the fact you don’t have an operating system running.
  • A startup code file that zeroes the .bss segment variables, copies the .data segment to ram and setups the NVIC vector table.
  • A Makefile to build everything easily.

The program and the Makefile can be done with not much worries, but the linker script and the startup code are quite difficult, at least for me, to understand and set up properly.

So I ended up building from scratch the whole files needed and licensed them with a BSD license (Basically, do what you want with them, just give me credit I’m happy if someone find them useful, you can contribute, but don’t blame me if it doesn’t work lol)

You can find them in this Github repository

Continue reading “A lot of stuff learned!”

Stellaris Launchpad

So, I got my 2 stellaris launchpad boards from TI.

Stellaris Launchpad

Each board has 2 Stellaris LM4F120H5QR ARM Cortex-M4 MCUs. The nice thing it’s I’ve had them for less than 5$ with free shipment.

I’ve followed the getting started tutorial on a windows machine, as they suggested, using their Code Composer Studio 5, which is free for the launchpad board, with now limitation on code size or time.
I’ve noticed that the examples can be built with a GNU cross-toolchain for arm-none-eabi, like the codesourcery lite if you don’t want to build your own (Yeah, I’m lazy).
I just used my ubuntu pc to test that out, and it was kinda easy to build some sample!

First thing to do it’s downloading the toolchain from here, you’ll need to register on their site. The installation it’s pretty straightforward, just follow the instructions on the site, with the shell change and the adding of the bin directory to the path.

You can verify to have a working toolchain with this test:

arm-none-eabi-g++ –version

Next you need to download the StellarisWare software from here you’ll need to register in here too but also getting an approval.

After downloading the StellarisWare you should create a folder on your home directory:

mkdir stellaris
cd stellaris

Then you just need to run unzip to extract inside your folder the content of the auto-extracting archive you downloaded.

unzip ../downloads/SW-EK-LM4F120XL-9453.exe

Then you’ll just have everything ready to work with that. Get inside a directory and just use make to build the project. The cross compiling and all the variables configurations are in the makedefs file in the stellarisware folder!

The only missing part until now it’s how you load to the compiled bin file into the microcontroller. On windows it can be achieved with the LMLoader program. In linux there’s no way at the moment usually with the ICDI controller on board, the only way it’s using a JTAG adapter connected on the breakout JTAG connector.

The nice thing it’s that there’s also a d DFU Bootloader on the chip, maybe with some work I could get it working and uhm that would be useful somehow.