top of page

Support Forum

Public·1033 members

Debugging the the firmware - getting started

Hi all.


I'm trying to get started making some custom firmware for the AudioMoth to detect bat, dolphin and porpoise clicks and record a long term spectral average.


I've bought the Wonder Gecko starter kit, downloaded Simplicity Studio and set the basic firmware project up according to instructions on GitHub. The projects builds just fine however I cannot seem to get printf statements to display on the console? I've added AudioMoth_setupSWOForPrint() after AudioMoth_initialise() to enable output however that does not appear to make a difference.


I'm pretty new to this type of device. Am I missing something obvious here? Should I be using a special terminal in Simplicity Studio or something?


Also does anyone have advice on how to better replicate an AudioMoth using the development board. Do developers usually solder an SD card reader and/or microphone to the development board?


Any help much appreciated.



/* Main function */

int main(void) {


	/* Initialise device */

	AudioMoth_initialise();


	AudioMoth_setupSWOForPrint();

	// push dummy newline through SWO so first interrupt outputs message
	printf("Starting up BP_Firmware module.\n");


	/* Check the switch position */

	AM_switchPosition_t switchPosition = AudioMoth_getSwitchPosition();

	if (switchPosition == AM_SWITCH_USB) {

		/* Handle the case that the switch is in USB position. Waits in low energy state until USB disconnected or switch moved  */

		AudioMoth_handleUSB();

	} else {

		/* Flash both LED */

		//        AudioMoth_setBothLED(true);

		AudioMoth_delay(100);

		//        AudioMoth_setBothLED(false);

        AudioMoth_setRedLED(true);

		printf("hello\n");


	}

	/* Power down and wake up in one second */

	AudioMoth_powerDownAndWake(1, true);

}

465 Views
Ilana Stolovas
Ilana Stolovas
Jun 28, 2022

Hi, did you succeed in debugging AM firmware?

I am having trouble connecting a Segger J-Link Edu Mini, and also tried with a Giant Gecko board. The debugger does not detect AM chip. I have tried a similar code as your post, avoiding all EM4 states

Support Forum

©2025 Open Acoustic Devices

bottom of page