embeded/raspberry pi2018. 4. 18. 17:45

생각해보니 예전에 i.MX283 에

dd로 생성한 img 굽다가 실패한 이유가..

단순 dd로 만들고 나서 

mkfs로 포맷만 했기 때문이려나?


아래 스크립트에서는

dd로 생성 후

fdisk로 파티션을 만들고

mkfs.vfat과 mkfs.ext4로 포맷을 해주도록 되어있다.


[링크 : https://github.com/andrius/build-raspbian-image/blob/master/raspbian/build_raspbian_sd_card.sh]

[링크 : https://www.raspberrypi.org/forums/viewtopic.php?t=41520]

Posted by 구차니
embeded/odroid2018. 4. 17. 22:49

어라.. 왜케 달라지고 희한하게 나오지?


 idle + lan + hdmi

 2.50

 idle + lan

 2.45

 idle + hdmi

 2.23

 idle

 2.22


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

odroid u3 저전력은 안되나..  (0) 2018.04.22
odroid u3 mediawiki 설치해보니..  (0) 2018.04.19
odroid u3 boot.ini  (0) 2018.04.17
odroid u3 libreelec  (0) 2018.02.21
odroid 해상도 설정  (0) 2018.02.21
Posted by 구차니
embeded/raspberry pi2018. 4. 17. 15:29


Edit /boot/cmdline.txt and add maxcpus=N

[링크 : https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=99372]

[링크 : https://www.raspberrypi.org/forums/viewtopic.php?t=152692]


USB 허브 끄기 - 단, 네트워크도 죽어버림(그럼 도대체 어떻게 쓰란거지 -ㅁ-?)

#!/bin/bash

#Code to stop

/etc/init.d/networking stop

echo 0 > /sys/devices/platform/bcm2708_usb/buspower;

echo “Bus power stopping”


#!/bin/bash

#Code to start

echo 1 > /sys/devices/platform/bcm2708_usb/buspower;

echo “Bus power starting”

sleep 2;

/etc/init.d/networking start 


video output 끄기

This tip has been suggested by many people. If your system is headless (no video output) you can turn off the HDMI port with:

sudo /opt/vc/bin/tvservice -o

to turn it back on:

sudo /opt/vc/bin/tvservice -p

This command will save you around 20-30mA. 

[링크 : https://babaawesam.com/2014/01/24/power-saving-tips-for-raspberry-pi/]


/sys/devices/system/cpu/cpu0/online 이 있으면 논리적으로 on/off 가능하다는데

라즈베리에는 

/sys/devices/system/cpu/online

/sys/devices/system/cpu/offline 만 존재한다.

[링크 : https://stackoverflow.com/questions/44907731/programmatically-disable-cpu-core]


+

$ chcpu


Usage:

 chcpu [options]


Options:

  -h, --help                    print this help

  -e, --enable <cpu-list>       enable cpus

  -d, --disable <cpu-list>      disable cpus

  -c, --configure <cpu-list>    configure cpus

  -g, --deconfigure <cpu-list>  deconfigure cpus

  -p, --dispatch <mode>         set dispatching mode

  -r, --rescan                  trigger rescan of cpus

  -V, --version                 output version information and exit 


라즈베리에서는 안되네..

$ sudo chcpu -r

chcpu: This system does not support rescanning of CPUs

$ sudo chcpu -e 2

chcpu: CPU 2 is not hot pluggable 

[링크 : https://www.ibm.com/support/knowledgecenter/en/linuxonibm/com.ibm.linux.z.lgdd/lgdd_t_cpu_online.html]


+

/sys/devices/system/cpu/cpufreq/ondemand $ cat up_threshold

50 

[링크 : https://raspberrypi.stackexchange.com/questions/9034/how-to-change-the-default-governor]

'embeded > raspberry pi' 카테고리의 다른 글

rpi 3b PMIC  (0) 2018.04.23
rpi img 생성하기  (0) 2018.04.18
라즈베리 파이 배포용 이미지 만들기  (0) 2018.02.23
라즈베리 파이 번개모양 아이콘  (2) 2018.02.19
rpi config.txt avoid_safe_mode=1  (0) 2018.02.18
Posted by 구차니
embeded/odroid2018. 4. 17. 14:20

HDMI 끄는법을 찾는데

C0 에서는 setenv vpu "1"으로 VPU도 끄고

setenv hdmioutput "0" 으로 HDMI도 끌 수 있는거 같은데

For example to disable cpu1:

echo 0 | sudo tee /sys/devices/system/cpu/cpu1/online


To re-enable:

echo 1 | sudo tee /sys/devices/system/cpu/cpu1/online


CPUs are numbered 0 to 3. You can not disable CPU0.


You can confirm in dmesg:

CODE: SELECT ALL

[86696.500790] IRQ93 no longer affine to CPU1

[86696.501155] CPU1: shutdown


CODE: SELECT ALL

[86968.395163] CPU1: Booted secondary processor



You should be able to set CPU frequency with 'cpufreq-set' (example for 1Ghz):

CODE: SELECT ALL

sudo cpufreq-set -f 1000000


# Disable VPU (Video decoding engine, Saves RAM!!!)

# 0 = disabled

# 1 = enabled

setenv vpu "1"


# Disable HDMI Output (Again, saves ram!)

# 0 = disabled

# 1 = enabled

setenv hdmioutput "1" 

[링크 : https://forum.odroid.com/viewtopic.php?f=111&t=25957]


U3 에서는 해당 설정이 보이지 않는다.

[링크 : http://odroid.com/dokuwiki/doku.php?id=en:u3_tips#how_to_change_u-boot_configuration_by_bootini]


일단은.. u-boot 한번 분석해 보면 먼가 답이 나오려나?

[링크 : http://odroid.com/dokuwiki/doku.php?id=en:u3_building_u-boot]

[링크 : https://github.com/hardkernel/u-boot/tree/odroidc-v2011.03]


+

라즈베리 파이 2B 서버로 돌리는거 빼고

odroid u3를 3개 돌리면 어떨까 고민중

라즈베리는 안정적으로 2W 미만인데

odroid u3는 idle이 2W라 CPU 죽이고 하면서 한번 소비전력을 낮춰볼까 고민중

U3는 CPU disable 해보고 거버너 설정하거나 최대 클럭 설정해보면서 테스트 해봐야 할 듯..


라즈베리 2B가 나오면 머하는데 써볼까...



+

아래 명령어로 cpu 여러개 동시에 끌수는 있는데

1개만 쓴다고 해서 소비전류가 티나게 줄진 않는다.

$ sudo chcpu -d 1,2,3

CPU 1 disabled

CPU 2 disabled

CPU 3 disabled


CPU 0        2.67
CPU 0,1      2.69~2.71
CPU 0,1,2    2.69~2.71
CPU 0,1,2,3  2.69~2.71



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

odroid u3 mediawiki 설치해보니..  (0) 2018.04.19
odroid u3 소비전력 재측정  (0) 2018.04.17
odroid u3 libreelec  (0) 2018.02.21
odroid 해상도 설정  (0) 2018.02.21
odroid u3 mame psp  (0) 2018.02.20
Posted by 구차니
embeded/FPGA - ALTERA2018. 4. 17. 11:32

Project Navigator에서 Hierarchy

FPGA 우클릭 후 Setting(혹은 Ctrl - Shift - E)

General의 Top-level entity를 설정해주면 된다.

물론 한번이라도 Compilation을 수행해야 목록이 갱신된다.



'embeded > FPGA - ALTERA' 카테고리의 다른 글

Nios II 컴파일 관련  (0) 2018.05.18
altera conf_done  (0) 2018.05.04
Device Installer (Quartus Prime 17.1)  (0) 2018.04.17
Quartus 프로젝트 생성  (0) 2018.04.16
Clock domain  (0) 2018.04.05
Posted by 구차니
embeded/FPGA - ALTERA2018. 4. 17. 11:05

qdz 확장자로 장치가 받아지는데

설치는 Device Installer를 통해 이루어 진다.


Step 1. Device Installer 실행


Step 2. qdz 파일이 들어있는 경로 선택


Step 3. 추가된 장치들 중에 필요한 것들을 선택


Step 4. 귀찮으니 Next


Step 5. 11메가 짜리라 금세 깐다(용량 작아서 MAX 2/5로 선택)


Step 6. 의외로 별거 없이 끝!


Step 7. Quartus Prime을 재시작 필요하다고 하는데 머. Quartus를 실행중이지 않으니 상관없나.


Step 8. 장치로 가보니 CycloneIV E/GX 외에 MAX II/V가 추가되었다!


[링크 : https://www.alteraforum.com/forum/showthread.php?t=45744]


+

qdz 라길래

Quartus Device Z... 혹시 Zip? 인가 해서 확장자 바꾸고 해보니 맞네

Zip으로 압축된 파일이었군..


dxf는 캐드파일인거 같고

ddb만 바이너리고 pll이나 ref는 ASCII 파일이다.


'embeded > FPGA - ALTERA' 카테고리의 다른 글

altera conf_done  (0) 2018.05.04
quartus 프로젝트 entry point 설정  (0) 2018.04.17
Quartus 프로젝트 생성  (0) 2018.04.16
Clock domain  (0) 2018.04.05
Nios II HAL alt_load()  (0) 2018.04.03
Posted by 구차니
embeded/FPGA - ALTERA2018. 4. 16. 20:19

어라.. vivado 처럼

핀.설정 하나도 안해도 합성이 되네?!

vivado 만의 특색인줄 알았는데

terasic에서 de0-nano용으로 생성되는 프로젝트만 열어서 하다보니

생각도 못했네 -ㅁ-


+

2018.04.17

pin planner도 xlinx의 것 처럼

먼저 빌드 하고 추가로 핀을 할당해주면 된다.



'embeded > FPGA - ALTERA' 카테고리의 다른 글

quartus 프로젝트 entry point 설정  (0) 2018.04.17
Device Installer (Quartus Prime 17.1)  (0) 2018.04.17
Clock domain  (0) 2018.04.05
Nios II HAL alt_load()  (0) 2018.04.03
EPCS 부팅 관련 BSP Editor 설정  (0) 2018.03.24
Posted by 구차니
embeded/arduino(genuino)2018. 4. 10. 20:18

아두이노 보드가 물리적으로 포함될 경우 문제없음

파생된 디자인을 경우 CCL에 의해 Eagle(회로도) 공개필요

코어 라이브러리 사용가능(LGPL 따름), 소스 비공개 가능


Can I build a commercial product based on Arduino?

Yes, with the following conditions:

  • Physically embedding an Arduino board inside a commercial product does not require you to disclose or open-source any information about its design.
  • Deriving the design of a commercial product from the Eagle files for an Arduino board requires you to release the modified files under the same Creative Commons Attribution Share-Alike license. You may manufacture and sell the resulting product.
  • Using the Arduino core and libraries for the firmware of a commercial product does not require you to release the source code for the firmware. The LGPL does, however, require you to make available object files that allow for the relinking of the firmware against updated versions of the Arduino core and libraries. Any modifications to the core and libraries must be released under the LGPL.
  • The source code for the Arduino environment is covered by the GPL, which requires any modifications to be open-sourced under the same license. It does not prevent the sale of derivative software or its inclusion in commercial products.

In all cases, the exact requirements are determined by the applicable license. Additionally, see the previous question for information about the use of the name “Arduino”.  

[링크 : https://www.arduino.cc/en/Main/FAQ#toc10]

Posted by 구차니
embeded/FPGA - ALTERA2018. 4. 5. 22:27

클럭분석 빠른 로직(단계 짧은)

느린로직과 서로다른 클록 사용가능

[링크 : https://stackoverflow.com/.../why-use-multiple-clocks-of-the-same-speed-in-an-fpga-design]


읽어 볼 걸 찾아 보고 있는데

일단 클럭 도메인을 통해서 전원소비를 줄일수도 있는 듯?

Avalon Memory Manager와 nios 클럭 서로 다르게 줄 수 있다.


13. Power Optimization

 In this design, a Nios® II processor acts as the controller operating at 50 MHz. A DMA controller operating at 100 MHz manages the data path, and reads and writes data buffers that also operate at 100 MHz.

[링크 : https://www.altera.com/en_US/pdfs/literature/hb/qts/qts_qii52016.pdf]

Cyclone V SoC Power Optimization

[링크 : https://www.altera.com/content/dam/altera-www/global/en_US/pdfs/literature/an/an734.pdf]

11. Building Systems with Multiple Clock Domains

[링크 : https://www.altera.com.cn/content/dam/altera-www/global/zh_CN/pdfs/literature/hb/qts/qts_qii54008.pdf]


Metastability - 준안정성

Understanding Metastability in FPGAs 

[링크 : https://www.altera.com/en_US/pdfs/literature/wp/wp-01082-quartus-ii-metastability.pdf]


AN 545: Design Guidelines and Timing Closure Techniques for HardCopy ASICs

[링크 : https://www.altera.com/content/dam/altera-www/global/en_US/pdfs/literature/an/an545.pdf]

'embeded > FPGA - ALTERA' 카테고리의 다른 글

Device Installer (Quartus Prime 17.1)  (0) 2018.04.17
Quartus 프로젝트 생성  (0) 2018.04.16
Nios II HAL alt_load()  (0) 2018.04.03
EPCS 부팅 관련 BSP Editor 설정  (0) 2018.03.24
intel FPGA/altera 소비전력 예측  (0) 2018.03.23
Posted by 구차니
embeded/FPGA - ALTERA2018. 4. 3. 13:13


Nios II Eclipse에서 bsp 프로젝트 아래에 summary.html이 하나 보이길래 열어보니 

해당 설정에 대한 내용이 나온다.


Setting Name:hal.linker.allow_code_at_reset
Identifier:ALT_ALLOW_CODE_AT_RESET
Default Value:0
Value:1
Type:Boolean
Destination:none
Description:Indicates if initialization code is allowed at the reset address. If true, defines the macro ALT_ALLOW_CODE_AT_RESET in linker.h.
Restrictions:If true, defines the macro ALT_ALLOW_CODE_AT_RESET in linker.h. This setting is typically false if an external bootloader (e.g. flash bootloader) is present.

Setting Name:hal.linker.enable_alt_load
Identifier:none
Default Value:0
Value:1
Type:Boolean
Destination:none
Description:Enables the alt_load() facility. The alt_load() facility copies data sections (.rodata, .rwdata, or .exceptions) from boot memory to RAM. If true, this setting sets up the VMA/LMA of sections in linker.x to allow them to be loaded into the .text memory.
Restrictions:This setting is typically false if an external bootloader (e.g. flash bootloader) is present.

Setting Name:hal.linker.enable_alt_load_copy_exceptions
Identifier:none
Default Value:0
Value:0
Type:Boolean
Destination:none
Description:Causes the alt_load() facility to copy the .exceptions section. If true, this setting defines the macro ALT_LOAD_COPY_EXCEPTIONS in linker.h.
Restrictions:none

Setting Name:hal.linker.enable_alt_load_copy_rodata
Identifier:none
Default Value:0
Value:0
Type:Boolean
Destination:none
Description:Causes the alt_load() facility to copy the .rodata section. If true, this setting defines the macro ALT_LOAD_COPY_RODATA in linker.h.
Restrictions:none

Setting Name:hal.linker.enable_alt_load_copy_rwdata
Identifier:none
Default Value:0
Value:1
Type:Boolean
Destination:none
Description:Causes the alt_load() facility to copy the .rwdata section. If true, this setting defines the macro ALT_LOAD_COPY_RWDATA in linker.h.
Restrictions:none

 


일단 감이 안오니.. 프로젝트 전체로 검색해본결과

bsp/HAL/src/alt_load.c 에 해당 함수가 존재하고


alt_load.c의 alt_load()상단에 링커 정의 심볼이 존재한다.

extern alt_u32 __flash_rwdata_start __attribute__((section(".data")));

extern alt_u32 __ram_rwdata_start __attribute__((section(".data")));

extern alt_u32 __ram_rwdata_end __attribute__((section(".data")));

extern alt_u32 __flash_rodata_start __attribute__((section(".data")));

extern alt_u32 __ram_rodata_start __attribute__((section(".data")));

extern alt_u32 __ram_rodata_end __attribute__((section(".data")));

extern alt_u32 __flash_exceptions_start __attribute__((section(".data")));  

extern alt_u32 __ram_exceptions_start __attribute__((section(".data")));

extern alt_u32 __ram_exceptions_end __attribute__((section(".data"))); 


음.. bsp 설정 바꾸고 bsp 빌드 하면 이런것도 재생성 되려나?


+

해봤는데.. alt_load.c 내용이 바뀌진 않네.. 머지?

'embeded > FPGA - ALTERA' 카테고리의 다른 글

Quartus 프로젝트 생성  (0) 2018.04.16
Clock domain  (0) 2018.04.05
EPCS 부팅 관련 BSP Editor 설정  (0) 2018.03.24
intel FPGA/altera 소비전력 예측  (0) 2018.03.23
intel quartus 2 modelsim 사용하기  (0) 2018.03.19
Posted by 구차니