gcc -M을 통해서 해당 소스가 끌어와야 하는 헤더들의 목록을 얻어낼수 있다.

이걸 이용하여 역으로

make 파일에서 사용해야 하는 헤더들의 목록을 생성해 낼 수 있고

이걸 make dep나 make depend를 통해서 수행하게 된다.


생각해보니.. ifdef로 된거.. option 파일이 아닌

-D 인자를 통해서 gcc -M -Dflag 해주면... 외부에서 소스변경없이 구현이 가능해져서 더 편하려나?


[링크 : http://developinghappiness.com/?p=174]

    [링크 : http://developinghappiness.com/?page_id=222]


[링크 : http://linux.die.net/man/1/gccmakedep]

'프로그램 사용 > make, configure' 카테고리의 다른 글

make 기본셸  (0) 2016.06.08
makefile := = 차이점  (0) 2016.06.04
make 암시적 룰  (0) 2015.12.18
make jobserver unavailable  (0) 2015.12.16
make 아카이브  (0) 2015.12.14
Posted by 구차니

타겟을 만들지 않아도 컴파일 되는 이유... 라고 해야하나?

*.c는 $(CC)를

*.cc나 *.C는 $(CXX)를 이용해서 컴파일 하는데


$(CPPFLAGS) 와 $(CFLAGS)를 인자로 받으니..

여기에 헤더와 링커 경로를 넣어주면 자동으로 알아서 작동하는 마법!


Compiling C programs

n.o is made automatically from n.c with a recipe of the form ‘$(CC) $(CPPFLAGS) $(CFLAGS) -c’.


Compiling C++ programs

n.o is made automatically from n.cc, n.cpp, or n.C with a recipe of the form ‘$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c’. We encourage you to use the suffix ‘.cc’ for C++ source files instead of ‘.C’.


[링크 : http://www.gnu.org/software/make/manual/make.html#Catalogue-of-Rules] 

[링크 : http://korea.gnu.org/manual/4check/make-3.77/ko/make_10.html#SEC91]


패턴 규칙 예제(Pattern Rule Examples)


다음은 make에 의해서 실제로 미리 정의된 패턴 규칙들의 몇가지 예제들이다. 먼저 `.c' 파일들을 `.o' 로 컴파일하는 규칙은:


%.o : %.c

        $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@


[링크 : http://korea.gnu.org/manual/4check/make-3.77/ko/make_10.html#SEC96] 


'프로그램 사용 > make, configure' 카테고리의 다른 글

makefile := = 차이점  (0) 2016.06.04
make 의존성 파일?  (0) 2015.12.18
make jobserver unavailable  (0) 2015.12.16
make 아카이브  (0) 2015.12.14
make 매크로  (0) 2015.12.14
Posted by 구차니
프로그램 사용/gcc2015. 12. 17. 17:13

-E는 프리프로세서를 거친 결과를 뽑아준다면..

-M은 확장된 헤더의 목록만 빼준다.


-E

Stop after the preprocessing stage; do not run the compiler proper. The output is in the form of preprocessed source code, which is sent to the standard output.


-M

Instead of outputting the result of preprocessing, output a rule suitable for make describing the dependencies of the main source file. The preprocessor outputs one make rule containing the object file name for that source file, a colon, and the names of all the included files, including those coming from -include or -imacros command line options.


Unless specified explicitly (with -MT or -MQ), the object file name consists of the name of the source file with any suffix replaced with object file suffix and with any leading directory parts removed. If there are many included files then the rule is split into several lines using \-newline. The rule has no commands.

This option does not suppress the preprocessor's debug output, such as -dM. To avoid mixing such debug output with the dependency rules you should explicitly specify the dependency output file with -MF, or use an environment variable like DEPENDENCIES_OUTPUT . Debug output will still be sent to the regular output stream as normal.


Passing -M to the driver implies -E, and suppresses warnings with an implicit -w.


-MM

Like -M but do not mention header files that are found in system header directories, nor header files that are included, directly or indirectly, from such a header.


This implies that the choice of angle brackets or double quotes in an #include directive does not in itself determine whether that header will appear in -MM dependency output. This is a slight change in semantics from GCC versions 3.0 and earlier.


[링크 : http://linux.die.net/man/1/gcc]

'프로그램 사용 > gcc' 카테고리의 다른 글

gcc -fPIC  (0) 2016.06.22
gcc dependency .d 파일?  (0) 2016.03.28
gcc 초기화 관련  (0) 2015.10.21
precompiled header on GCC (라즈베리로 테스트)  (2) 2015.07.30
gcc에서 precompiled header 사용하기  (0) 2015.07.29
Posted by 구차니
embeded2015. 12. 17. 16:36

대충 보면 어셈인줄 알았는데.. 스크립트라네...


[링크 : http://wiki.osdev.org/Linker_Scripts]


[링크 : http://www.scoberlin.de/content/media/http/informatik/gcc_docs/ld_3.html]

[링크 : http://korea.gnu.org/manual/release/ld/ld-mahajjh/ld_3.html]

'embeded' 카테고리의 다른 글

PCB 마킹 의미  (0) 2016.07.28
COM26T2844VTX 관련...  (0) 2016.03.16
시리얼 저항 / 직렬 저항 / 댐핑 저항  (0) 2015.12.17
microchip PIC  (0) 2015.09.08
9$ computer C.H.I.P?  (0) 2015.05.27
Posted by 구차니
embeded2015. 12. 17. 14:30

이게 다 같은 건가?


일단 이걸 쓰는 이유는

1. 전류제한

2. 임피던스 매칭으로 노이즈 제거

3. 전압변경(좋은 방법은 아니지만)

등등등...


[링크 : http://programfrall.tistory.com/43]

[링크 : http://pcbee.tistory.com/entry/직렬series-저항-값에-대한-고찰]

[링크 : http://blog.naver.com/rlaghlfh/110127337569] 댐핑 저항

[링크 : http://www.solvline.com/technical_info/tech_note_view.php?no=24] 종단 저항(terminator)

'embeded' 카테고리의 다른 글

COM26T2844VTX 관련...  (0) 2016.03.16
링커 스크립트 문법(ld syntax)  (0) 2015.12.17
microchip PIC  (0) 2015.09.08
9$ computer C.H.I.P?  (0) 2015.05.27
PowerQUICC  (0) 2015.04.02
Posted by 구차니
embeded/ARM2015. 12. 17. 13:44

흐음...


pull up/down 저항이 낮아서 문제가 되려나?

[링크 : http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/p/348680/1220668]

[링크 : http://www.alteraforum.com/forum/archive/index.php/t-32059.html]



JTAG ModeSWD ModeSignalRequired pull-up / pull-down (if not implemented internally by MCU)
TCKSWCLKClock into the coreUse 10K-100K Ohm pull-down resistor to GND
TDI-JTAG Test Data InputUse 10K-100K Ohm pull-up resistor to VCC
TDOSWVJTAG Test Data Output / SWV trace data output (SWO)Use 10K-100K Ohm pull-up resistor to VCC
TMSSWDIOJTAG Test Mode Select / SWD data in/outUse 10K-100K Ohm pull-up resistor to VCC
GNDGND--

[링크 : https://www.lpcware.com/content/faq/lpcxpresso/debug-design]

[링크 : http://www.support.code-red-tech.com/CodeRedWiki/HardwareDebugConnections] 조만간 폭파


SignalConnects to...
TMSTest Mode State pin — Use 100K Ohm pull-up resistor to VCC.
TDOTest Data Out pin.
RTCKJTAG Return Test ClocK. (see Note below)
TDITest Data In pin — Use 100K Ohm pull-up resistor to VCC.
TRSTTest ReSeT/ pin — Use 100K Ohm pull-up resistor to VCC. TRST is optional and not available on some devices. You may leave it unconnected.
TCLKTest CLocK pin — Use 100K Ohm pull-down resistor to GND.
VCCPositive Supply Voltage — Power supply for JTAG interface drivers.
GNDDigital ground.
RESETRSTIN/ pin — Connect this pin to the (active low) reset input of the target CPU.
CPUCLKCPU clock (according IEEE Standard 1149.1).
OCDSEEnable/Disable OCDS interface (Infineon-specific).
TRAPTrap condition (Infineon-specific).
BRKINHardware break in (Infineon-specific).
BRKOUTHardware break out (Infineon-specific).
/JENJTAG Enable (STMicroelectronics specific).
TSTATJTAG ISP Status (STMicroelectronics specific) (optional).
/RSTChip reset (STMicroelectronics specific).
/TERRJTAG ISP Error (STMicroelectronics specific) (optional).

[링크 : http://www.keil.com/support/man/docs/ulink2/ulink2_hw_connectors.htm]

[링크 : http://forum.falinux.com/zbxe/?document_srl=796669...]

'embeded > ARM' 카테고리의 다른 글

ulink flashmagic  (0) 2016.09.02
armada 370 - ARMv7 인데 neon이 없네?  (0) 2015.12.30
jtag과 swd  (0) 2015.12.14
비글본 github 저장소  (0) 2015.10.30
arm9 dsp / arm11 simd instuction 비교?  (0) 2015.10.01
Posted by 구차니
embeded/freeRTOS2015. 12. 16. 16:25

음.. 소스 레벨에서는 역시 무리이고..

돌려보고 최대로 먹는거 보면서 분할을 해줘야 하려나?


[링크 : http://www.freertos.org/FAQMem.html]

[링크 : http://www.microchip.com/forums/m590414.aspx]

    [링크 : http://sourceforge.net/p/freertos/discussion/382005/thread/33791e60/]

    [링크 : http://www.freertos.org/uxTaskGetStackHighWaterMark.html]

    [링크 : http://www.freertos.org/Stacks-and-stack-overflow-checking.html]

[링크 : http://www.freertos.org/a00111.html]

'embeded > freeRTOS' 카테고리의 다른 글

esp32 freertos  (0) 2023.12.08
stm32 freertos  (0) 2023.12.08
lm3s811 freeRTOS ADC...  (0) 2015.11.16
freertos 자료  (0) 2015.11.12
freeRTOS 패키지?  (0) 2015.11.11
Posted by 구차니

‘warning: jobserver unavailable: using -j1. Add `+' to parent make rule.’


In order for make processes to communicate, the parent will pass information to the child. Since this could result in problems if the child process isn’t actually a make, the parent will only do this if it thinks the child is a make. The parent uses the normal algorithms to determine this (see How the MAKE Variable Works). If the makefile is constructed such that the parent doesn’t know the child is a make process, then the child will receive only part of the information necessary. In this case, the child will generate this warning message and proceed with its build in a sequential manner.


make 프로세스가 통신을 하기 위해서, 부모는 자식에게 정보를 넘겨줄 것이다. 자식 프로세스가 실제로 make를 하지 못하는 문제가 발생하기 전까지, 부모는 자식이 make를 진행 중이라고 생각을 할 것이다. 부모는 이것을 결정하기 위한 일반적인 알고리즘을 사용한다(How the MAKE Variable Works를 볼 것). 만약 makefile이 부모가 자식이 make 프로세스란걸 알지 못 하는 것과 같은 구조로 짜여있을 경우, 자식은 필요한 정보의 일부분만 받게 될 것이다. 이경우, 자식은 이 경고 메시지를 생성하고 자신의 빌드를 순차적인 방법으로 진행할 것이다.


[링크 : https://www.gnu.org/software/make/manual/html_node/Error-Messages.html]


Recursive make commands should always use the variable MAKE, not the explicit command name ‘make’, as shown here:


subsystem:

        cd subdir && $(MAKE)

[링크 : https://www.gnu.org/software/make/manual/html_node/MAKE-Variable.html#MAKE-Variable]



한줄 요약하자면..

병렬 구조로 안짜여졌으니 병렬로 안하겠어! 라는 의미


해결책은..

make -c ... 

이런거 대신

$(MAKE) -c ...

이런식으로 MAKE 변수를 써라.. 인가?



+

Only certain flags go into $(MAKEFLAGS).  -j isn't included because the sub-makes communicate with each other to ensure the appropriate number of jobs are occuring


Also, you should use $(MAKE) instead of make, since $(MAKE) will always evaluate to the correct executable name (which might not be make).

[링크 : http://stackoverflow.com/questions/9147196/makefile-pass-jobs-param-to-sub-makefiles]



The ‘-j’ option is a special case (see Parallel Execution). If you set it to some numeric value ‘N’ and your operating system supports it (most any UNIX system will; others typically won’t), the parent make and all the sub-makes will communicate to ensure that there are only ‘N’ jobs running at the same time between them all. Note that any job that is marked recursive (see Instead of Executing Recipes) doesn’t count against the total jobs (otherwise we could get ‘N’ sub-makes running and have no slots left over for any real work!)


If your operating system doesn’t support the above communication, then ‘-j 1’ is always put into MAKEFLAGS instead of the value you specified. This is because if the ‘-j’ option were passed down to sub-makes, you would get many more jobs running in parallel than you asked for. If you give ‘-j’ with no numeric argument, meaning to run as many jobs as possible in parallel, this is passed down, since multiple infinities are no more than one.


If you do not want to pass the other flags down, you must change the value of MAKEFLAGS, like this:


subsystem:

        cd subdir && $(MAKE) MAKEFLAGS=

The command line variable definitions really appear in the variable MAKEOVERRIDES, and MAKEFLAGS contains a reference to this variable. If you do want to pass flags down normally, but don’t want to pass down the command line variable definitions, you can reset MAKEOVERRIDES to empty, like this:


MAKEOVERRIDES =

This is not usually useful to do. However, some systems have a small fixed limit on the size of the environment, and putting so much information into the value of MAKEFLAGS can exceed it. If you see the error message ‘Arg list too long’, this may be the problem. (For strict compliance with POSIX.2, changing MAKEOVERRIDES does not affect MAKEFLAGS if the special target ‘.POSIX’ appears in the makefile. You probably do not care about this.)


A similar variable MFLAGS exists also, for historical compatibility. It has the same value as MAKEFLAGS except that it does not contain the command line variable definitions, and it always begins with a hyphen unless it is empty (MAKEFLAGS begins with a hyphen only when it begins with an option that has no single-letter version, such as ‘--warn-undefined-variables’). MFLAGS was traditionally used explicitly in the recursive make command, like this:


subsystem:

        cd subdir && $(MAKE) $(MFLAGS)

but now MAKEFLAGS makes this usage redundant. If you want your makefiles to be compatible with old make programs, use this technique; it will work fine with more modern make versions too.


[링크 : https://www.gnu.org/.../html_node/Options_002fRecursion.html#Options_002fRecursion]



'프로그램 사용 > make, configure' 카테고리의 다른 글

make 의존성 파일?  (0) 2015.12.18
make 암시적 룰  (0) 2015.12.18
make 아카이브  (0) 2015.12.14
make 매크로  (0) 2015.12.14
make -j -l  (0) 2015.11.30
Posted by 구차니
게임/FEZ2015. 12. 15. 19:54

으아아아아아!!! 드럽게 어렵다!!!! ㅠㅠ

공략을 봐도 모르겠네... ㅠㅠ






[링크 : http://www.xblafans.com/fez-complete-cube-guide-45383.html]

'게임 > FEZ' 카테고리의 다른 글

fez 1회차 끝  (0) 2015.12.20
fez 80.1%...  (0) 2015.12.13
오늘의 FEZ 70.3%  (0) 2015.12.06
FEZ - 약.. 40%? -> 52.7%  (0) 2015.11.29
FEZ  (0) 2015.11.08
Posted by 구차니


archive(member)


foolib(hack.o) : hack.o

        ar cr foolib hack.o



[링크 : http://www.viper.pe.kr/docs/make-ko/make-ko_11.html#SEC104]

[링크 : https://www.gnu.org/software/make/manual/html_node/Archives.html]


c

Create the archive.


r

Insert the files member... into archive (with replacement).


[링크 : http://linux.die.net/man/1/ar]

[링크 : ]

[링크 : ]

[링크 : ]

'프로그램 사용 > make, configure' 카테고리의 다른 글

make 암시적 룰  (0) 2015.12.18
make jobserver unavailable  (0) 2015.12.16
make 매크로  (0) 2015.12.14
make -j -l  (0) 2015.11.30
makefile 병렬 대비하기  (0) 2015.11.30
Posted by 구차니