File: attiny85_crash_gdb.c

package info (click to toggle)
simavr 1.6%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 20,268 kB
  • sloc: ansic: 362,806; makefile: 622; ruby: 70; python: 63
file content (28 lines) | stat: -rw-r--r-- 418 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 * attiny85_crash_gdb.c
 *
 *  Created on: 1 Dec 2009
 *      Author: jone
 */

#include <avr/sleep.h>
#include <avr/io.h>
#include "avr_mcu_section.h"

AVR_MCU(F_CPU, "attiny85");


int main()
{

	/*
	 * this is not much, but that crashed the core, and should activate
	 * the gdb server properly, so you can see it stopped, here
	 */

	*((uint8_t*)0xdead) = 0x55;

	// should never reach here !

	sleep_mode();
}