Skip to content
This repository was archived by the owner on Apr 19, 2022. It is now read-only.
This repository was archived by the owner on Apr 19, 2022. It is now read-only.

Freeze after upload #337

@MrBlinky

Description

@MrBlinky

After uploading Evade 2. Arduboy will lock up due to USB interrupts left enabled by the bootloader in combination with the undefined USB interrupt vector.

add UDIEN = 0 before init() to fix this.
also adding attribute ((OS_main)) to main will save a few extra bytes

int __attribute__ ((OS_main)) main(void)
{
    UDIEN = 0; //disable possible enabled USB interrupts from bootloader
	init();

	initVariant();
	
	setup();
    
	for (;;) {
		loop();
		if (serialEventRun) serialEventRun();
	}
        
	return 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions