Recent Posts

Pages: 1 2 3 4 5 6 [7] 8 9 10
61
General (but related to Code::Blocks) / Re: forums.codeblocks.org Cert has expired
« Last post by sodev on October 30, 2025, 01:29:08 am »
New cert has an expiry date of:
- Thu, 22 Jan 2026 15:46:40 GMT

Thanks, I will report to our site admin about this.

No need to report anything, Let't Encrypt certificates do have a short lifespan by intent ;)
62
Embedded development / Re: MSP430 Programming with Debugging
« Last post by glen-the-grey on October 30, 2025, 12:23:55 am »
I have also just found that you need to add the Launchpad to the udevd rules if you want to be able to run mspdebug as a non root user.

I have some instructions but the codeblocks forum software wont let me write them so I've attached a screenshot.
63
Embedded development / Re: MSP430 Programming with Debugging
« Last post by glen-the-grey on October 29, 2025, 11:41:28 pm »
Just had to re-install on Debian and it seems things have changed with the update to 13 "Trixie".

The good news is the bundled mspdebug is now the latest version so you can just install it with apt.

The bad news is that the library "libmsp430.so" which is needed to run mspdebug on the newer FET debuggers or Launchpad boards is no-longer bundled with Debian, nor does it seem to be available from the Internet anywhere (despite there being numerous projects and websites dedicated to building libmsp430 and the MSP430 most seem to be out of date, obsolete or simply silently fail...many of the downloads from TI just fail without any explanation, I suspect it might be that they are 32bit ELF *.bin files and they wont run on a 64bit system?).

Anyway, several hours of digging around and I found the only place where libmsp430.so seems to be available:

https://www.ti.com/tool/MSP430-FLASHER

This has the MSP430-FLASHER tools (make sure to download the 64bit version) which can be installed into your home directory and inside there is the libmsp430.so file.  I simply made a symlink to it from  /usr/lib/libmsp430.so but you could probably include the install directory into the search path for libraries or just copy the library over.
64
I modified the last command to give perf permissions, so now it is

Code
sudo sysctl -w kernel.perf_event_paranoid=1
65
Is there any way you could tell me what "auto" actually is or give me an example as to how to re-create the situation you're showing here?

You can simply do this:

1, clone the code repo or download the zip file:  asmwarrior/parserlib: A c++ recursive-descent PEG parsing library that supports left recursion..

2, open the cbp project in the root folder: https://github.com/asmwarrior/parserlib/blob/master/test_parser_lib.cbp

3, open the file: cpp_lexer_grammar.h in the C::B editor

4, you can use clangd_client, and use the mouse to hover the "token" variable in the line 172

5, you will see a very big tip window which cover the whole screen, note I only tested on Windows 10 OS.

Thanks.
66
Not the debug tip window, sometimes, the code completion tip(from the clangd_client plugin) window becomes extremely large, see the blow two screen shot, the tip window cover the whole C::B window, also the tip window extended to another screen.  :(

 Is there any way you could tell me what "auto" actually is or give me an example as to how to re-create the situation you're showing here?
67
To profile an executable application with Perf and Hotspot on Linux do the following:

  • Install Perf with the command
Code
sudo apt install linux-perf
  • Install Hotspot with the command
Code
sudo apt install hotspot
  • Open Code::Blocks and go to Tools menu
  • Make click on Add to add a new tool
  • In Name put Perf Profiler
  • Create a .sh script with a name perf-profile.sh in a custom location
  • Add the following code to the script
Code
#!/bin/bash

# Universal perf profiler for Code::Blocks 25.01
# Usage:
#   perf-profile.sh <executable_path> [lib_directory]
# If lib_directory is omitted, uses executable's directory.

PERF_OUTPUT_DIR="$HOME/PERF_DATA"

if [ $# -lt 1 ]; then
    echo "❌ Error: Missing executable path."
    echo "   Usage: $0 <executable> [lib_dir]"
    exit 1
fi

EXE_PATH="$1"
EXE_DIR="$(dirname "$EXE_PATH")"
EXE_NAME="$(basename "$EXE_PATH")"

if [ ! -f "$EXE_PATH" ]; then
    echo "❌ Executable not found: $EXE_PATH"
    exit 1
fi

# Determine lib directory
if [ $# -ge 2 ] && [ -n "$2" ]; then
    LIB_DIR="$2"
    echo "🧩 Using custom lib dir (arg): $LIB_DIR"
else
    LIB_DIR="$EXE_DIR"
    echo "🧩 Using executable's dir as lib dir: $LIB_DIR"
fi

if [ ! -d "$LIB_DIR" ]; then
    echo "⚠️  Warning: Library directory does not exist: $LIB_DIR"
fi

# Prepare output
mkdir -p "$PERF_OUTPUT_DIR"
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
PERF_DATA_PATH="$PERF_OUTPUT_DIR/${EXE_NAME}_${TIMESTAMP}.perf.data"

echo "▶️  Profiling: $EXE_PATH"
echo "📂 Working dir: $EXE_DIR"
echo "💾 Perf data → $PERF_DATA_PATH"

cd "$EXE_DIR" || exit 1
export LD_LIBRARY_PATH="$LIB_DIR:$LD_LIBRARY_PATH"

perf record --call-graph dwarf -o "$PERF_DATA_PATH" \
  env LD_LIBRARY_PATH="$LIB_DIR:$LD_LIBRARY_PATH" "$EXE_PATH"

if [ -f "$PERF_DATA_PATH" ]; then
    echo "✅ Profiling done. Opening in Hotspot..."
    hotspot "$PERF_DATA_PATH" &
else
    echo "⚠️  No perf data generated."
fi
  • On the script you can custom the path PERF_OUTPUT_DIR to any location you want to store the perf collected data (this data is large in size so take that in count)
  • Give execution permissions to the script with the command
Code
chmod +x perf-profile.sh
  • In Code::Blocks Tools on Executable browse to the script file
  • In Parameters add the following
Code
$(TARGET_OUTPUT_FILE) /path/to/custom/libraries
  • where the path to custom libraries is the path where the libraries referenced by the application to profile are located
  • We leave Working directory empty
  • Click OK to add the tool
  • Add sudo capabilities to perf with the command
Code
sudo sysctl -w kernel.perf_event_paranoid=1

After doing all this we have the profiler Perf tool working in combination with Hotspot. To profile an application we activate a executable project rebuild all and then we go to Tools and click on the Perf Profiler, execute our application for a while and then close it to see the data analysis on Hotspot.
68
Nightly builds / Re: The 25 October 2025 build (13754) is out.
« Last post by cppuser on October 28, 2025, 02:31:37 pm »
thank you!
69
Not the debug tip window, sometimes, the code completion tip(from the clangd_client plugin) window becomes extremely large, see the blow two screen shot, the tip window cover the whole C::B window, also the tip window extended to another screen.  :(
70
Nightly builds / Re: The 25 October 2025 build (13754) is out.
« Last post by Xaviou on October 27, 2025, 07:16:23 pm »
Hi.

32 bits version for Windows can be downloaded from my website.

Debian Trixie (64 bits) and Bookworm (32 and 64 bits) can be installed from my repo
The corresponding unsigned deb files can also be downloaded from the website page linked above.

Ubuntu-22.04, 24.10, 25.04 and 25.10 versions can be installed from my ppa (they are now available for both amd64 and arm64 architectures).

Regards
Xav'
Pages: 1 2 3 4 5 6 [7] 8 9 10