Наконец-то допинал перенос uOS на платы Uno32 и Max32. Померял время переключения задач и время входа в обработчик прерывания - получилось соответственно 2.13 мксек и 0.90 мксек. Вполне неплохо.
Да, еще msp430f2272 точно работает - была одна коммерческая разработка на нем. При выборе главное с размером RAM не промахнуться. В 512 байт система точно не поместится. Для реальных приложений надо килобайта 2 хотя бы.
Не получается прошить плату. Указал в target.cfg путь до компилятора и avrdude из сборки mpide для chipkit - процесс завершается бесконечным таймаутом. Из пример blink из mpide прошивается нормально.
avrdude: Version 5.10, compiled on Jun 29 2010 at 03:44:14 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/opt/mpide/hardware/tools/avrdude.conf" User configuration file is "/home/benderamp/.avrduderc" User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyUSB0 Using Programmer : stk500v2 Overriding Baud Rate : 115200 AVR Part : 32MX795F512L Chip Erase delay : 9000 us PAGEL : PD7 BS2 : PA0 RESET disposition : dedicated RETRY pulse : SCK serial program mode : yes parallel program mode : yes Timeout : 200 StabDelay : 100 CmdexeDelay : 25 SyncLoops : 32 ByteDelay : 0 PollIndex : 3 PollValue : 0x53 Memory Detail :
avrdude: Device signature = 0x504943 avrdude: safemode: lfuse reads as 0 avrdude: safemode: hfuse reads as 0 avrdude: safemode: efuse reads as 0 avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed To disable this feature, specify the -D option. avrdude: current erase-rewrite cycle count is -1145324613 (if being tracked) avrdude: erasing chip avrdude: reading input file "test-latency.hex" avrdude: writing flash (19984 bytes):
У меня то же самое. Причем и на Линуксе, и на Mac OS. Надо просто жать ^C в этом месте. Думаю, это какая-то бага в самом avrdude. Прошивается оно нормально, и проверка успешно проходит, но не может закрыть сеанс.
Загвоздка в компиляторе. С версиями cpp-chipKIT-newlibtest-linux32-20111010 и mpide-0023-linux-20120903 работает нормально, но с mips-gcc-4.7.2 виснет. Буду разбираться.
Все оказалось просто: нужно добавить флаг -EL для gcc. У этих версий разные умолчания. Если не указано, mips-elf-gcc использует big endian, а pic32-gcc - little endian. Исправлено, обновите исходники с SVN.
avrdude: Version 5.10, compiled on Jun 29 2010 at 03:44:14 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/opt/mpide/hardware/tools/avrdude.conf" User configuration file is "/home/benderamp/.avrduderc" User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyUSB0 Using Programmer : stk500v2 Overriding Baud Rate : 115200 avrdude: stk500_2_ReceiveMessage(): timeout
В этот момент нужно нажать кнопку reset на плате - процесс почти сразу продолжится. Второй раз как уже было выше - в конце - программа начинает работать, нужно просто нажать ctrl+c.
no subject
--- cut ---
Поддерживаемые архитектуры:
Texas Instruments MSP430.
--- cut ---
а конкретно какие чипы? на MSP430G2553 можно завести?
no subject
На другие тоже можно приспособить, слегка поколдовав с таблицей векторов и инициализацией.
Смотрите здесь: http://code.google.com/p/uos-embedded/source/browse/#svn%2Ftrunk%2Fsources%2Fruntime%2Fmsp430
no subject
no subject
При выборе главное с размером RAM не промахнуться. В 512 байт система точно не поместится. Для реальных приложений надо килобайта 2 хотя бы.
no subject
/opt/mpide/hardware/tools/avrdude -C /opt/mpide/hardware/tools/avrdude.conf -P /dev/ttyUSB0 -c stk500v2 -p pic32 -b 115200 -v -U flash:w:test-latency.hex:i
avrdude: Version 5.10, compiled on Jun 29 2010 at 03:44:14
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/opt/mpide/hardware/tools/avrdude.conf"
User configuration file is "/home/benderamp/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyUSB0
Using Programmer : stk500v2
Overriding Baud Rate : 115200
AVR Part : 32MX795F512L
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 10 4 0 no 2048 8 0 9000 9000 0xff 0xff
flash 65 10 128 0 yes 524288 256 2048 4500 4500 0xff 0xff
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
Programmer Type : STK500V2
Description : Atmel STK500 Version 2.x firmware
Programmer Model: AVRISP
Hardware Version: 15
Firmware Version Master : 2.10
Vtarget : 0.0 V
SCK period : 276.7 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x504943
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: current erase-rewrite cycle count is -1145324613 (if being tracked)
avrdude: erasing chip
avrdude: reading input file "test-latency.hex"
avrdude: writing flash (19984 bytes):
Writing | ################################################## | 100% 6.21s
avrdude: 19984 bytes of flash written
avrdude: verifying flash memory against test-latency.hex:
avrdude: load data flash data from input file test-latency.hex:
avrdude: input file test-latency.hex contains 19984 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 2.01s
avrdude: verifying ...
avrdude: 19984 bytes of flash verified
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: safemode: Fuses OK
avrdude: stk500v2_recv(): checksum error
avrdude: stk500_2_ReceiveMessage(): timeout
no subject
no subject
TEST = test-leds
сделал make load (avrdude зали test-leds.hex) - LD4 (13й пин на плате) просто горит, хотя должен мигать.
Моя отдельная программа (светодиод на 6м пине):
#include
TEST = test-leds
сделал make load (avrdude зали test-leds.hex) - LD4 (13й пин на плате) просто горит, хотя должен мигать.
Моя отдельная программа (светодиод на 6м пине):
#include <runtime/lib.h>
#include <kernel/uos.h>
char stack [400];
void hello (void *data) {
//PORTDSET = 1 << 2;
for (;;) {
PORTDINV = 1 << 2;
mdelay (100);
}
}
void uos_init (void) {
TRISDCLR = 1 << 2;
task_create(hello, 0, "hello", 1, (array_t*)stack, sizeof (stack));
}
Тоже не работает - диод просто не горит. Но LD4 на плате уже с ума не сходит как раньше.
no subject
no subject
no subject
no subject
Перепрошивка сопровождается 2мя таймаутами - первый раз перед началом:
/opt/mpide/hardware/tools/avrdude -C /opt/mpide/hardware/tools/avrdude.conf -P /dev/ttyUSB0 -c stk500v2 -p pic32 -b 115200 -v -U flash:w:test-leds.hex:i
avrdude: Version 5.10, compiled on Jun 29 2010 at 03:44:14
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/opt/mpide/hardware/tools/avrdude.conf"
User configuration file is "/home/benderamp/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyUSB0
Using Programmer : stk500v2
Overriding Baud Rate : 115200
avrdude: stk500_2_ReceiveMessage(): timeout
В этот момент нужно нажать кнопку reset на плате - процесс почти сразу продолжится. Второй раз как уже было выше - в конце - программа начинает работать, нужно просто нажать ctrl+c.
no subject
Достал меня несколько этот avrdude. Пожалуй, имеет смысл добавить в pic32prog поддержку этого протокола. Будет гораздо проще и стабильнее.