Code::Blocks supports custom tools that can be installed in the main menu. They are meant to be "click to execute" tools. The teensy loader is a bit different, and I have not yet found a way to make it work like in the arduino IDE. My setup simply allows starting the teensy loader, and that's it. The hex file is not selected automatically, and you have to press the teensy's program button to load the file.
In the main menu, go to "Tools"->"Configure Tools...":
Click on "Add".
Give the new tool a name and select the binary (replace the arduino root directory with the one in your system). Also select "Launch tool visible detached":
It should now appear in the Tools menu, so you can start it from within Code::Blocks. You can see in the first screenshot that I also tried to get teensy_post_compile to work (this is what is used in the arduino IDE), but I couldn't get it to work as intended.
In the main menu, go to "Tools"->"Configure Tools...":
Click on "Add".
Give the new tool a name and select the binary (replace the arduino root directory with the one in your system). Also select "Launch tool visible detached":
It should now appear in the Tools menu, so you can start it from within Code::Blocks. You can see in the first screenshot that I also tried to get teensy_post_compile to work (this is what is used in the arduino IDE), but I couldn't get it to work as intended.