embeded/AVR (ATmega,ATtiny)2017. 2. 12. 20:07

대충보는데

링커에서 개별 오브젝트 파일의 상대주소나 절대주소를 변경해줄수 있는데

hex파일로 바뀐건 이미 링커의 결과물이라

임의로 변경은 힘들지도?


그럼 hex를 objdump로 object 파일로 덤프해서 다시 링커로 연결하면서 주소를 바꿀수 있을려나?

hex는 bin의 ascii 표현법이고

hex2bin으로 바이너리로 환원하고 다시 링커로 해주면 되려나


[링크 : http://www.avrfreaks.net/forum/how-link-bootloaderhex-applicationelf]


걍 찾아봐도 안나오는거 봐서는.. 그리 권장할 만한 아이디어가 아닌건가?

아니면 리버스목적이 아닌 이상 쓸모가 없는 방법이라서 그런걸까?

'embeded > AVR (ATmega,ATtiny)' 카테고리의 다른 글

avr pwm 관련  (0) 2017.04.19
IAR AVR은 start section 설정이 안되나?  (0) 2017.02.17
우리로봇기술 사이트 폐쇄  (0) 2016.08.24
avr iar __flash winavr PROGMEM  (0) 2016.07.06
부품들 정리  (0) 2016.04.16
Posted by 구차니
embeded/arduino(genuino)2017. 2. 11. 12:54

그렇게 궁금해 하던 오리지널 소스 발견!


int main(void)
{
init();
initVariant();
#if defined(USBCON)
USBDevice.attach();
#endif
setup();
for (;;) {
loop();

if (serialEventRun) serialEventRun();

}
return 0;
}



[링크 : https://github.com/arduino/Arduino/blob/master/hardware/arduino/avr/cores/arduino/main.cpp]

    [링크 : https://github.com/arduino/Arduino/tree/master/hardware/arduino/avr/cores/arduino]


[링크 : https://github.com/arduino/Arduino/tree/master/hardware/arduino/avr/bootloaders] AVR기반

[링크 : https://github.com/arduino/ArduinoCore-samd/tree/master/bootloaders/zero] ARM기반


2016/03/28 - [embeded/arduino(genuino)] - 아두이노 빌드 프로세스 & c/cpp



+

간단하게 말해서.. FT232 USB to RS232 칩에서 DTR를 감지하면 자동으로 리셋을 걸어버린다.

그런 이유로 아두이노 부트로더에만 업로드 하는 것이 있고,

아두이노 sketch쪽 스켈레톤 코드에는 특정 코드에서 리부팅 하는 부분이 없다.


Since the DTR signal goes from 5V to 0 at the moment a new connection to the Arduino is started, if you send this signal to the reset line of the Arduino's processor, it resets. 

[링크 : http://www.instructables.com/id/Overview-the-Arduino-sketch-uploading-process-and-/]


Data Terminal Ready (DTR) is a control signal in RS-232 serial communications, transmitted from data terminal equipment (DTE), such as a computer, to data communications equipment (DCE), for example a modem, to indicate that the terminal is ready for communications and the modem may initiate a communications channel.

[링크 : https://en.wikipedia.org/wiki/Data_Terminal_Ready]

[링크 : https://www.arduino.cc/en/uploads/Main/ArduinoNano30Schematic.pdf]


대충보면.. Makefile에서 sketch를 c로 변경해서 빌드할때 .text 섹션을 BOOT_START 주소로 옮기고 링킹하는 듯?


$ vi /usr/share/arduino/hardware/arduino/bootloaders/caterina/Makefile

#---------------- Linker Options ---------------- # -Wl,...: tell GCC to pass this to linker. # -Map: create map file # --cref: add cross reference to map file LDFLAGS = -Wl,-Map=$(TARGET).map,--cref LDFLAGS += -Wl,--section-start=.text=$(BOOT_START) LDFLAGS += -Wl,--relax LDFLAGS += -Wl,--gc-sections LDFLAGS += $(EXTMEMOPTS) LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS)) LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB) #LDFLAGS += -T linker_script.x








-Wl,--section-start=.bootloader=0x1E000 

[링크 : http://www.atmel.com/webdoc/AVRLibcReferenceManual/FAQ_1faq_reloc_code.html]

'embeded > arduino(genuino)' 카테고리의 다른 글

릴레이로 AC전원 스위치하기  (0) 2017.10.26
hoverlabs 사의 hover 제품  (0) 2017.07.17
avrdude arduino  (0) 2016.12.02
pwm ppm decode  (0) 2016.11.28
arduino clcd  (0) 2016.11.25
Posted by 구차니
embeded/raspberry pi2017. 1. 25. 16:56

대충 기억에 2W 정도 먹는걸로 기억을 하는데 (5V * 0.4A)


옥션에서 이녀석을 샤오미 10400 배터리와 결합하던가 아니면 다른거랑 연결해서

충전하면서 쓰면 어떨까하는 생각이 들어서 검색해보니 이미 있네? ㅋㅋ


아무튼.. 월 1.4KW 아끼자고 돈 너무 들이게 되는건가? ㅋㅋ


[링크 : http://www.voltaicsystems.com/blog/powering-a-raspberry-pi-from-solar-power/]

[링크 : http://www.digikey.com/.../how-to-use-solar-cells-to-power-a-raspberry-pi-3-single-board-computer]

[링크 : https://blog.adafruit.com/.../how-to-build-a-solar-powered-raspberry-pi-piday-raspberrypi-raspberry_pi/]



+

일단은 가격효율로는 5W급 18V가 좋네..

5W면은 라즈베리에서 2W 먹고(오드로이드 2개 켜 놓을수 있겠네 ㅋㅋ)

3W로 충전하니까 5V * 0.6A= 3W

쨍쨍한 날에는 3W로 일광시간 계산해서 대충 3~4시간 가능하다고 하면 어림도 없겠네? ㅠㅠ

[링크 : http://itempage3.auction.co.kr/DetailView.aspx?ItemNo=B363037063] 5V 1W급 11500원

[링크 : http://itempage3.auction.co.kr/DetailView.aspx?ItemNo=B301853790] 18V 5W급 20400원



+

배터리 시스템 관련 문서

[링크 : https://media.blackhat.com/bh-us-11/Miller/BH_US_11_Miller_Battery_Firmware_Public_WP.pdf]


SBC (Smart Battery Charger)

SBS (Smart Battery Specification)

[링크 : http://sbs-forum.org/specs/sbc110.pdf]



eleparts 기준 AFE는 3~4천원인데.. 

충전률 확인하는 뒤에 녀석이 1.0~1.7만 정도 하네..

그래서 노트북 배터리가 드럽게 비싸구나.. ㅠㅠ

[링크 : http://www.ti.com/lit/ds/symlink/bq29312.pdf] 리튬 배터리 보호 AFE(Analog Front End) - i2c 통신

[링크 : http://www.ti.com/lit/ds/symlink/bq20z80-v101.pdf] 충전률 확인?

[링크 : http://media.digikey.com/.../Panasonic Semiconductors ICs PDFs/EYP (E,F,H,ML,MU,N Series).pdf] 보호소자


걍 이걸 사서 써? ㅋ

[링크 : http://www.hardkernel.com/main/products/prdt_info.php?g_code=G139772454433] odroid ups

[링크 : https://www.modmypi.com/raspberry-pi/breakout-boards/pi-modules/ups-pico]

[링크 : https://pi.gate.ac.uk/pages/mopi.html]

Posted by 구차니
embeded/raspberry pi2017. 1. 17. 10:08

4k 55인치가 50만원 정도 하길래 문득 욕심이 나서

가능한가 찾아 보니.. 15p만 되면 어우...


그래도 odorid는 1920x1200까지만 된다고 하는거 보단 낫긴한데..

[링크 : http://forum.odroid.com/viewtopic.php?f=95&t=12026]


hdmi_group=2

hdmi_mode=87

hdmi_ignore_edid=0xa5000080

hdmi_cvt 3840 2160 15 

[링크 : http://raspberrypi.stackexchange.com/questions/44089/can-raspberry-pi-3-do-4k-video]


목록상에는 안나오는 87번 모드?

[링크 : http://elinux.org/RPiconfig]

Posted by 구차니
embeded/Cortex-M4 Ti2017. 1. 10. 18:53

정체 불명으로 의외로 빈번하게 안켜져서

하나하나 죽여 나가다 보니


while(!SysCtlPeripheralReady(SYSCTL_PERIPH_HIBERNATE)) ; 

위의 구문에서 무한루프 돌고 있었던거 같은데

VDD3ON 모드도 이야기가 나오고 이것저것 나오지만..

결론은 tivaware나 tm4c 시리즈가 이상해요 인가?


I discovered this on the Launchpad. I cannot hibernate with VDD3ON turned off becauseof the way my LDO is connected.

Yes, on the EK-TM4C123 only VDD3ON is the available Hibernate Mode.

[링크 : https://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/p/389095/1375698]


[링크 : https://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/p/385023/1358006#1358006]

'embeded > Cortex-M4 Ti' 카테고리의 다른 글

tm4c tivaware bootloader 빌드..  (2) 2017.12.26
심심해서 켜본 ek-tm4c123gxl 보드 (USB)  (0) 2017.12.21
tivaware swd debug / semihosting  (0) 2017.01.10
tm4c 하이버네이트 소스...  (0) 2016.12.20
tm4c rtc trim...  (0) 2016.11.23
Posted by 구차니
embeded/Cortex-M4 Ti2017. 1. 10. 18:36


[링크 : http:/ /processors.wiki.ti.com/index.php/Debug_Handbook_for_CCS]

    [링크 : http://processors.wiki.ti.com/index.php/Debug_Handbook_for_CCS#Cortex_M3.2FM4.2FTiva.2FMSP432]


음.. XDS-200 같은 고가 JTAG이 있어야 가능한건가?

ARM's Serial Wire Output(SWO) Trace capability is one such tool incorporated in Code Composer Studio for the following Cortex M based TI devices:

MSP432

Tiva C (TM4C129 and TM4C123)

CC26xx

CC13xx


Tiva/TM4C

Pre-requisites:

CCS Version 6.1.1 or higher

XDS200 debug probe firmware version 1.0.0.5 or later. (Contact your XDS200 vendor for details on how to determine debug probe version and update it if needed).

[링크 : http://processors.wiki.ti.com/index.php/SWO_Trace]


+

semihosting을 활성화 하고 그거에 맞춰서 코딩해라?

[링크 : http://www.coocox.org/forum/viewtopic.php?f=2&t=3588]

[링크 : http://www.keil.com/support/man/docs/armcc/armcc_pge1358787046598.htm]

[링크 : http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0471g/Bgbjjgij.html]

[링크 : http://www.trace32.com/wiki/index.php/SemiHosting_과_그_활용]

[링크 : http://processors.wiki.ti.com/index.php/Semihosting]

[링크 : http://www.edaboard.com/thread207776.html]

'embeded > Cortex-M4 Ti' 카테고리의 다른 글

심심해서 켜본 ek-tm4c123gxl 보드 (USB)  (0) 2017.12.21
tm4c hibernate module 초기화 무한루프  (2) 2017.01.10
tm4c 하이버네이트 소스...  (0) 2016.12.20
tm4c rtc trim...  (0) 2016.11.23
tm4c rtc 빨라...  (0) 2016.11.02
Posted by 구차니
embeded/Cortex-M3 STM2017. 1. 10. 18:33

CMSIS - Cortex Microcontroller Software Interface Standard


[링크 : http://www.ti.com/lit/an/spma041g/spma041g.pdf]

    [링크 : https://www.arm.com/.../cortex-m/cortex-microcontroller-software-interface-standard.php]

    [링크 : http://www.ti.com/tool/cmsis_device_headers] download


Cortex-m0는 ITM 미지원 

[링크 : https://www.arm.com/files/pdf/AT_-_Advanced_Debug_of_Cortex-M_Systems.pdf]

[링크 : http://blog.atollic.com/cortex-m-debugging-printf-redirection-to-a-debugger-console-using-swv/itm-part-1]


+

lm3s 시리즈에는 DFP(Device Family Pack)로 제공하는데 cmsis가 포함되어있는진 모르겠네

[링크 : https://www.keil.com/dd2/pack/]

'embeded > Cortex-M3 STM' 카테고리의 다른 글

STM32F103 관련 용어  (0) 2021.02.02
CMSIS for stm32  (0) 2018.02.12
stm32 DMA 관련글들  (0) 2017.12.11
stm32 cortex-m3 api / library  (0) 2015.01.17
stm32f103z ?  (0) 2015.01.10
Posted by 구차니
embeded/raspberry pi2016. 12. 31. 09:41

신버전이 나와서 깔았더니 SSH가 안된다 -ㅁ-

확인을 해보니.. 일단 ssh가 비활성화 되어 있고

기본암호인 raspberrypi로 쓸 경우 부팅시에 경고를 띄우게 되어 있다.

아무래도 데스크 탑 대용이라던가 기본값으로 쓰다 보니 보안 문제가 있어서

이런식으로 기본은 SSH로 작동을 하지 않도록 바뀐듯..

그런데 그러면 무조건 모니터 연결해야 해서 이래저래 불편하네..

[링크 : https://www.raspberrypi.org/downloads/raspbian/]


그리고 화면은 HDMI overscan 활성화..

그거와 별개로 집에서 HDMI to DVI를 통해 1600x900 뜨는건 모니터 쪽 EDID 정보 문제일 듯..

배경은 무지 이뻐졌네 ㅋㅋ




+

2018.01.10

$ touch /boot/ssh

하듯 파일을 생성해주면 ssh가 활성화 된다.

2016년 11월 이후 릴리즈에 대해서 보안상의 이유로 변경


[링크 : https://blog.naver.com/opusk/220984515191]

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

라즈베리 파이 + 태양전지!  (0) 2017.01.25
라즈베리 파이 4k 대응 @15p  (2) 2017.01.17
라즈베리 저전력 발악해보기?  (0) 2016.12.16
라즈베리 파이 xorg.conf  (0) 2016.11.03
rpi microSD slot  (0) 2016.10.31
Posted by 구차니
embeded/odroid2016. 12. 25. 20:17

cpu 점유율 무지 낮네?

이정도면.. 화면에 출력 안하면  640x480 으로 두개 동시에 처리하는거 무리 없을지도?



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

odroid u3 mame psp  (0) 2018.02.20
odroid U2/U3 USB 전원 사용하도록 개조 + 케이스  (0) 2018.01.16
odroid u3 전원소비 (경우별)  (0) 2016.12.15
odroid vlc 웹캠 cpu 점유율  (0) 2016.11.26
odroid u3 16.04 vlc / webcam  (0) 2016.11.21
Posted by 구차니
embeded/Cortex-M4 Ti2016. 12. 20. 10:49

my Ti 계정 있어야 함

진즉에 검색해볼걸 그랬나...


SW-DK-TM4C123G-2.1.3.156.exeDK-TM4C123GL Kit Software60168K

[링크 : http://software-dl.ti.com/tiva-c/SW-TM4C/latest/index_FDS.html]



소스 기본 골격 자체는 lm3s1968이랑 차이가 없네

    //
    // Check to see if Hibernation module is already active, which could mean
    // that the processor is waking from a hibernation.
    //
    if(HibernateIsActive())
    {
        //
        // Read the status bits to see what caused the wake.
        //
        ui32Status = HibernateIntStatus(0);
        HibernateIntClear(ui32Status);

        //
        // If the wake is due to button or RTC, then read the first location
        // from the battery backed memory, as the hibernation count.
        //
        if(ui32Status & (HIBERNATE_INT_PIN_WAKE | HIBERNATE_INT_RTC_MATCH_0))
        {
            HibernateDataGet(&ui32HibernateCount, 1);
        }
    }

    //
    // Enable the Hibernation module.  This should always be called, even if
    // the module was already enabled, because this function also initializes
    // some timing parameters.
    //
    HibernateEnableExpClk(ROM_SysCtlClockGet());

    //
    // If the wake was not due to button or RTC match, then it was a reset.
    //
    if(!(ui32Status & (HIBERNATE_INT_PIN_WAKE | HIBERNATE_INT_RTC_MATCH_0)))
    {
        //
        // Configure the module clock source.
        //
        HibernateClockConfig(HIBERNATE_OSC_LOWDRIVE);

        //
        // Wait a couple of seconds in case we need to break in with the
        // debugger.
        //
        SysTickWait(3 * 100);

        //
        // Allow time for the crystal to power up.  This line is separated from
        // the above to make it clear this is still needed, even if the above
        // delay is removed.
        //
        SysTickWait(15);
    }

    //
    // Clear and enable the RTC and set the match registers to 5 seconds in the
    // future. Set both to same, though they could be set differently, the
    // first to match will cause a wake.
    //
    HibernateRTCSet(0);
    HibernateRTCEnable();
    HibernateRTCMatchSet(0, 5);

    //
    // Set wake condition on pin or RTC match.  Board will wake when 5 seconds
    // elapses, or when the button is pressed.
    //
    HibernateWakeSet(HIBERNATE_WAKE_PIN | HIBERNATE_WAKE_RTC);

    //
    // Request hibernation.
    //
    HibernateRequest();


'embeded > Cortex-M4 Ti' 카테고리의 다른 글

tm4c hibernate module 초기화 무한루프  (2) 2017.01.10
tivaware swd debug / semihosting  (0) 2017.01.10
tm4c rtc trim...  (0) 2016.11.23
tm4c rtc 빨라...  (0) 2016.11.02
tm4c hibernate module 초기화 관련..  (0) 2016.11.01
Posted by 구차니