CFLAGS += -O2 -Wall
CFLAGS += -g
+CORE_CFLAGS = -nostdinc
ifeq (${shell uname}, Darwin)
# gcc 4.2 from MacOS is really not up to scratch anymore
# this rule has precedence
${OBJ}/sim_%.o : cores/sim_%.c
ifeq ($(V),1)
- $(CC) $(CPPFLAGS) $(CFLAGS) -MMD \
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(CORE_CFLAGS) -MMD \
${AVR_CPPFLAGS} \
$< -c -o $@
else
- @$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS) -MMD \
+ @$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS) $(CORE_CFLAGS) -MMD \
${AVR_CPPFLAGS} \
$< -c -o $@
@echo CORE $<
along with simavr. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stdio.h>
#include "sim_avr.h"
#include "sim_core_declare.h"
#include "avr_eeprom.h"
along with simavr. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stdio.h>
#include "sim_avr.h"
#include "sim_core_declare.h"
#include "avr_eeprom.h"
void m128_init(struct avr_t * avr)
{
struct mcu_t * mcu = (struct mcu_t*)avr;
-
- printf("%s init\n", avr->mmcu);
avr_eeprom_init(avr, &mcu->eeprom);
avr_flash_init(avr, &mcu->selfprog);
along with simavr. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stdio.h>
#include "sim_avr.h"
#include "sim_core_declare.h"
#include "avr_eeprom.h"
void m1280_init(struct avr_t * avr)
{
struct mcu_t * mcu = (struct mcu_t*)avr;
-
- //printf("%s init\n", avr->mmcu);
avr_eeprom_init(avr, &mcu->eeprom);
avr_flash_init(avr, &mcu->selfprog);
along with simavr. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stdio.h>
#include "sim_avr.h"
#include "sim_core_declare.h"
#include "avr_eeprom.h"
void m1281_init(struct avr_t * avr)
{
struct mcu_t * mcu = (struct mcu_t*)avr;
-
- printf("%s init\n", avr->mmcu);
avr_eeprom_init(avr, &mcu->eeprom);
avr_flash_init(avr, &mcu->selfprog);
along with simavr. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stdio.h>
#include "sim_avr.h"
{
struct mcu_t * mcu = (struct mcu_t*)avr;
- printf("%s init\n", avr->mmcu);
-
avr_eeprom_init(avr, &mcu->eeprom);
avr_flash_init(avr, &mcu->selfprog);
avr_watchdog_init(avr, &mcu->watchdog);
You should have received a copy of the GNU General Public License
along with simavr. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stdio.h>
+
#include "sim_avr.h"
#include "sim_megax4.h"
void mx4_init(struct avr_t * avr)
{
struct mcu_t * mcu = (struct mcu_t*)avr;
-
- printf("%s init\n", avr->mmcu);
avr_eeprom_init(avr, &mcu->eeprom);
avr_flash_init(avr, &mcu->selfprog);
You should have received a copy of the GNU General Public License
along with simavr. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stdio.h>
+
#include "sim_avr.h"
#include "sim_megax8.h"
{
struct mcu_t * mcu = (struct mcu_t*)avr;
- printf("%s init\n", avr->mmcu);
-
avr_eeprom_init(avr, &mcu->eeprom);
avr_flash_init(avr, &mcu->selfprog);
avr_watchdog_init(avr, &mcu->watchdog);
You should have received a copy of the GNU General Public License
along with simavr. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stdio.h>
+
#include "sim_avr.h"
#include "sim_megaxm1.h"
{
struct mcu_t * mcu = (struct mcu_t*)avr;
- printf("%s init\n", avr->mmcu);
-
avr_eeprom_init(avr, &mcu->eeprom);
avr_flash_init(avr, &mcu->selfprog);
avr_watchdog_init(avr, &mcu->watchdog);
void mxm1_reset(struct avr_t * avr)
{
struct mcu_t * mcu = (struct mcu_t*)avr;
- printf("%s reset\n", avr->mmcu);
+
avr->data[ mcu->lin.r_linbtr] = 0x20;
}
along with simavr. If not, see <http://www.gnu.org/licenses/>.
*/
-#include </usr/include/stdio.h>
#include "sim_avr.h"
#include "sim_core_declare.h"
#include "avr_eeprom.h"
{
struct mcu_t * mcu = (struct mcu_t*)avr;
- printf("%s init\n", avr->mmcu);
-
avr_eeprom_init(avr, &mcu->eeprom);
avr_watchdog_init(avr, &mcu->watchdog);
avr_extint_init(avr, &mcu->extint);
along with simavr. If not, see <http://www.gnu.org/licenses/>.
*/
-#include </usr/include/stdio.h>
#include "sim_core_declare.h"
#include "avr_eeprom.h"
#include "avr_watchdog.h"
{
struct mcu_t * mcu = (struct mcu_t*)avr;
- printf("%s init\n", avr->mmcu);
-
avr_eeprom_init(avr, &mcu->eeprom);
avr_watchdog_init(avr, &mcu->watchdog);
avr_extint_init(avr, &mcu->extint);
along with simavr. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stdio.h>
#include "sim_avr.h"
#include "sim_tinyx4.h"
{
struct mcu_t * mcu = (struct mcu_t*)avr;
- printf("%s init\n", avr->mmcu);
-
avr_eeprom_init(avr, &mcu->eeprom);
avr_watchdog_init(avr, &mcu->watchdog);
avr_extint_init(avr, &mcu->extint);
along with simavr. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stdio.h>
#include "sim_avr.h"
#include "sim_tinyx5.h"
{
struct mcu_t * mcu = (struct mcu_t*)avr;
- printf("%s init\n", avr->mmcu);
-
avr_eeprom_init(avr, &mcu->eeprom);
avr_watchdog_init(avr, &mcu->watchdog);
avr_extint_init(avr, &mcu->extint);
struct avr_io_usb {
uint8_t pipe; //[in]
- size_t sz; //[in/out]
+ uint32_t sz; //[in/out]
uint8_t * buf; //[in/out]
};
#define AVR_IOCTL_USB_NAK -2
#ifdef CONFIG_SIMAVR_TRACE
avr->trace_data = calloc(1, sizeof(struct avr_trace_data_t));
#endif
+
+ printf("%s init\n", avr->mmcu);
// cpu is in limbo before init is finished.
avr->state = cpu_Limbo;
void avr_reset(avr_t * avr)
{
+ printf("%s reset\n", avr->mmcu);
+
memset(avr->data, 0x0, avr->ramend + 1);
_avr_sp_set(avr, avr->ramend);
avr->pc = 0;