목록분류 전체보기 (61)
배우고픈 공돌이
IAR 의 경우, #pragma location = address __root const unsigned char Char_Data[8000] = { 0x00, }; 위의 #pragma를 통해 특정 메모리 주소에 데이터 배열, 함수 위치. __root에서 주소로부터 Char_Data를 적재. gnu_gcc의 경우, const unsigned char Char_Data[8000] __attribute__((at(address))) = { 0x00, }; *gcc 컴파일러 버전에 따라 at(address) 지원이 불가할 때, section(".MY_Section")으로 수정하는 방법이 존재. 1. 링크 스크립트에서 section 생성 MEMORY { RAM (xrw) : ORIGIN = 0x20000000,..
stm32f427vi 프로세서에서 플래시 섹터 확인.코어에서 메모리에 쓰는 시간(클럭) 계산. 쓰기 HAL_FLASH_Unlock(); __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR | FLASH_FLAG_PGSERR ); FLASH_Erase_Sector(FLASH_SECTOR_11, VOLTAGE_RANGE_3); for(int i=0; i
//main.c #include #include #include "list.h" void printInt(const void *pData) { printf("%d",*(int*)pData); } void printDouble(const void *pData) { printf("%f",*(double*)pData); } int main(void) { list_t list1, list2; initList(&list1, sizeof(int)); initList(&list2, sizeof(double)); int i=10;insertFirstNode(&list1,&i); int j = 40;insertNode(&list1,&i,&j); j = 30;insertNode(&list1,&i,&j); j = 20;in..
//main.c #include #include "queue.h" int main(void) { queue_t q1, q2; initQueue(&q1,10,sizeof(int)); initQueue(&q2,100,sizeof(double)); int i=100; push(&q1,&i); i=200; push(&q1,&i); i=300; push(&q1,&i); double j = 900.9; push(&q2,&j); j=800.8; push(&q2,&j); j=700.7; push(&q2,&j); pop(&q1,&i); printf("q1 1st pop : %d \n",i); pop(&q1,&i); printf("q1 2nd pop : %d \n",i); pop(&q1,&i); printf("q1 3rd..
//main.c #include #include "stack.h" int main(void) { stack_t s1, s2; initStack(&s1,10,sizeof(int)); initStack(&s2,100,sizeof(double)); int i=100; push(&s1,&i); i=200; push(&s1,&i); i=300; push(&s1,&i); double j = 900.9; push(&s2,&j); j=800.8; push(&s2,&j); j=700.7; push(&s2,&j); pop(&s1,&i); printf("s1 1st pop : %d \n",i); pop(&s1,&i); printf("s1 2nd pop : %d \n",i); pop(&s1,&i); printf("s1 3rd..
Unzip and go to the directory: tar xvf pulseaudio-6.0.tar.xz cd pulseaudio-6.0Run bootstrap script: ./bootstrap.shI will sum up here all errors I encountered (in case people search them by copy/paste): ./bootstrap.sh: line 46: intltoolize: command not found configure: error: Unable to find libltdl version 2. Makes sure you have libtool 2.4 or later installed. configure: error: *** sys/capability..
You have been given a string s, which is supposed to be a sentence. However, someone forgot to put spaces between the different words, and for some reason they capitalized the first letter of every word. Return the sentence after making the following amendments:Put a single space between the words.Convert the uppercase letters to lowercase.ExampleFor s = "CodefightsIsAwesome", the output should ..
java FX 개발 환경 구축 포스팅에 이어서 디바이스의 블루투스를 java로 제어하는 것을 해보려한다. 이 역할을 하는 라이브러리가 bluecove이다. 여기서 다운 받으면 되지만 FTFP로 옮겨야함으로 SSH커맨드로 받기로 한다. 참조 : https://stackoverflow.com/questions/12597986/my-java-bluetooth-server-on-raspberry-pi-running-debian-wheezy-needs-bluecove-na 위의 과정이 끝나면 ./target 안에 libbluecove_arm.so파일, bluecove-2.1.1-SNAPSHOT.jar 등이 존재한다. ../../bluecove/target/bluecove-2.1.1-SNAPSHOT.jar가 존재한..
자바에서 하드웨어를 다루기 위해서는 래핑된 c/c++ 과정을 거친다. 즉, 하드웨어를 다루는 low level에서는 c/c++로 컨트롤하고, 위의 레이어(자바)에서 사용할 수 있도록 셋팅한다. 그 것을 JNI(JAVA Native Interface)라 한다. 일단 호스트에서 arm i2c를 접근하기 위해 jna를 사용하여 이클립스로 개발한다. 1) JNA로 이클립스에서 ARM i2c(를 포함한 하드웨어 장치)를 개발할 수 있도록 환경 설정 jna.jar를 다운로드하고, 이클립스 자바 프로젝트에 넣는다. jar의 압축을 풀고, 풀어진 라이브러리의 경로를 설정해주어야한다. 2) 이클립스에서 프로그램 코드를 작성하자. 2 - 1) src에 Main 패키지를 만들고, 그 안에다 클래스를 생성한다. 2 - 2 )..
1. 호스트 개발 환경 구축 1-1 ) jdk 설치 ( 64bit 용은 확인하지 않음 ) 1-2 ) 이클립스 자바 IDE 설치 1-3 ) 이클립스 마켓에서 e(fx)clipse 3.0.0 설치 1-4 ) SceneBuilder 설치 2. 이클립스 데모 프로젝트 생성 *타겟보드의 java jdk 버전을 맞춘다. * 마지막으로 gui를 어떤 방식으로 짤껀지 선택한다.(1) FXGraph : ✤ JSON like object graph definition ✤ reduces the noise created by XML in FXML ✤ „compiles“ to FXML ✤ no runtime libraries needed(2) FXML : fx용 XML 자바 웹디자인. 3. SceneBuilder를 사용하여 화..