forum.getinpulse.com
http://www.getinpulse.com/hack/forum/

OS X compileandload.py compiles but load fails
http://www.getinpulse.com/hack/forum/viewtopic.php?f=5&t=258
Page 1 of 1

Author:  jvatic [ Fri Apr 29, 2011 6:10 am ]
Post subject:  OS X compileandload.py compiles but load fails

Hi,

I'm new to java and python so I'm hoping my new inPulse will motivate me to learn both.

Anyways, I'm following the mac guide (http://www.getinpulse.com/guide/mac/)

Output for L2CAPServerjar:
$ java -d32 -jar ./tools/L2CAPServer/L2CAPServer.jar
Created InpulseBtConnection
BlueCove version 2.1.0 on mac
Addr: 109ADDBB902D
Bluetooth Available: true
Stack: mac
inPulse L2CAPServer Started v1.0.1
Waiting for a connection...


Output for compileandload.py:
$ python compileandload.py -d 00:50:c2:79:xx:xx
use correct syntax
all .c files must be in src/ and all .h files in include/
Use a flat directory structure, no directories in src/ or include/ at this moment
File added: include/pulse_os.h
File added: include/pulse_types.h
File added: src/pulse_app.c

uuID= 5f42bcdd-609d-457d-affd-32145384501f

arm-none-eabi-gcc -o build/pulse_app  -Iinclude -std=gnu99 -g -Os -Wall -Wno-format -fno-builtin -mcpu=arm7tdmi-s -march=armv4t -mthumb -mthumb-interwork -ffunction-sections -fdata-sections -DNDEBUG -Wno-unused-parameter -Tlib/obj/firmware.ld -Wl,--cref -Wl,--gc-sections -Wl,-Map=build/pulse_app.map,-\( lib/libapp_common.a lib/libbtstack.a lib/libdebug.a lib/libkernel.a lib/libpulse_os.a lib/libpulse_protocol.a lib/libpulse_widgets.a lib/obj/irq.o lib/obj/kernel_struct.o src/pulse_app.c -lgcc -Wl,-\)
src/pulse_app.c: In function 'draw_time':
src/pulse_app.c:260: warning: pointer targets in passing argument 1 of 'pulse_cancel_timer' differ in signedness
include/pulse_os.h:104: note: expected 'int32_t *' but argument is of type 'uint32_t *'
src/pulse_app.c:276: warning: passing argument 2 of 'pulse_register_timer' from incompatible pointer type
include/pulse_os.h:93: note: expected 'PulseCallback' but argument is of type 'void (*)(uint32_t)'
src/pulse_app.c: In function 'main_app_handle_button_down':
src/pulse_app.c:311: warning: pointer targets in passing argument 1 of 'pulse_cancel_timer' differ in signedness
include/pulse_os.h:104: note: expected 'int32_t *' but argument is of type 'uint32_t *'
src/pulse_app.c:313: warning: passing argument 2 of 'pulse_register_timer' from incompatible pointer type
include/pulse_os.h:93: note: expected 'PulseCallback' but argument is of type 'void (*)(uint32_t)'
arm-none-eabi-objcopy -O ihex build/pulse_app build/pulse_app.hex
tools/fw_checksummer/checksummer.py build/pulse_app.hex build/pulse_app.bin
Length: 24998 / 28672
Free: 3674
Checksum: 0x9e594c20

compile success!

Compiled binary:  /Users/jblaster/Downloads/pulse_sdk/build/pulse_app.bin
Compiled binary:  /Users/jblaster/Downloads/pulse_sdk/build/pulse_app.hex
About to load firmware image
Traceback (most recent call last):
  File "compileandload.py", line 56, in <module>
    flashbinary( options.bdaddr, os.path.join(os.getcwd(), "build", "pulse_app.bin" ), 0x8000, False, True)
TypeError: flashbinary() takes exactly 4 arguments (5 given)


Most relevant part I think would be the last line of the python output
TypeError: flashbinary() takes exactly 4 arguments (5 given)

which suggests my version of whatever houses flashbinary() is out of date.

Any ideas? How can I further debug this?

Author:  jvatic [ Fri Apr 29, 2011 6:22 am ]
Post subject:  Re: OS X compileandload.py compiles but load fails

Fixed, tools/bt_python/flashbin.py defines flashbinary() and adding a fifth option got ride of the error.

Looking in compileandload.py the fifth option is always True and flashbinary() has a while True, could these be related? perhaps flashbinary() was updated to not hard code "True" but the old version was mistakenly released? Its disappointing to see these trivial issues in released code.

Author:  Eric [ Sat Apr 30, 2011 10:42 pm ]
Post subject:  Re: OS X compileandload.py compiles but load fails

Thanks for pointing out this error, I've corrected this in pulse_sdk114 at www.getinPulse.com/pulsesdk. It was my fault, a poor merge.

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/