Skip to content

Instantly share code, notes, and snippets.

scons: Reading SConscript files ...
Warning: This combination of gcc and swig have known incompatibilities.
If you encounter build problems, please update swig to 3.0 or later.
Checking for C header file Python.h... (cached) yes
Checking for C library pthread... (cached) yes
Checking for C library dl... (cached) yes
Checking for C library util... (cached) yes
Checking for C library m... (cached) yes
Checking for C library python2.7... (cached) yes
Checking for accept(0,0,0) in C++ library None... (cached) yes
#!/usr/bin/env python
# Copyright (C) 2013 National Cheng Kung University, Taiwan
# All rights reserved.
# Configure wether to trace these feature
# Warning : Too many contents may freeze Grasp
TRACE_QUEUE = True
TRACE_MUTEX = True
TRACE_BINARY_SEMAPHORE = False
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
load_entry_point('pip==1.5.4', 'console_scripts', 'pip3')()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 351, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2362, in load_entry_point
raise ImportError("Entry point %r not found" % ((group,name),))
ImportError: Entry point ('console_scripts', 'pip3') not found
Error in sys.excepthook:
Traceback (most recent call last):
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#include<stdbool.h>
#include<unistd.h>
#include<sys/types.h>
void main()
{
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include <unistd.h>
#include<math.h>
#include<stdbool.h>
#include<pthread.h>
#include<sys/types.h>
int value = 1;
// workspace/visualizer/main.c
void trace_task_switch(void *prev_task, unsigned int prev_tick, void *curr_task)
{
char buf[128];
int len = snprintf(buf, 128, "switch %d %d %d %d %d %d\n",
prev_task, curr_task,
xTaskGetTickCount(), get_reload(),
prev_tick, get_current());
write(logfile, buf, len);
}
// main.c +13
// define memory location of NVIC
#define NVIC_INTERRUPTx_PRIORITY ( ( volatile unsigned char *) 0xE000E400 )
// +317
int get_interrupt_priority(int interrupt)
{
if (interrupt < 240) // ARM 有 240 種 external interrupt(0~239) 和16種inernal interrupt
/* 根據 interrupt 設定 priority,這個常數宣告為 char*,故等同 array */
ROMDIR = $(DATDIR)/test-romfs
DAT += $(OUTDIR)/$(DATDIR)/test-romfs.o
$(OUTDIR)/$(ROMDIR).o: $(OUTDIR)/$(ROMDIR).bin
@mkdir -p $(dir $@)
@echo " OBJCOPY "$@
@$(CROSS_COMPILE)objcopy -I binary -O elf32-littlearm -B arm \
--prefix-sections '.romfs' $< $@
$(OUTDIR)/$(ROMDIR).bin: $(ROMDIR) $(OUTDIR)/$(TOOLDIR)/mkromfs
@mkdir -p $(dir $@)
@echo " MKROMFS "$@
/* main.c +185, enable to be compiled. */
#if 1
/* Create a task to record system log. */
xTaskCreate(system_logger,
(signed portCHAR *) "Logger",
1024 /* stack size */, NULL, tskIDLE_PRIORITY + 1, NULL);
#endif
/* main.c +126, create directory and file before open, avoid to fail. */
handle = host_action(SYS_SYSTEM, "mkdir -p output");
// fio.h line 15
#define MAX_FDS 32
typedef ssize_t (*fdread_t)(void * opaque, void * buf, size_t count);
typedef ssize_t (*fdwrite_t)(void * opaque, const void * buf, size_t count);
typedef off_t (*fdseek_t)(void * opaque, off_t offset, int whence);
typedef int (*fdclose_t)(void * opaque);
struct fddef_t {
fdread_t fdread;