Jump to content

JBr

EstablishedMember
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

0 Neutral

About JBr

  • Rank
    Newbrie
  1. I had the same happen. The fix was to rerun the installer, making sure I clicked the MPLAB support install button. It doesn't seem to be enough to copy the files; most likely the installer adds registry entries. Note that you need to both check MPLAB in the list and click the button during installation.
  2. Many thanks for the info! Maybe SB is saving their bullets for v7 since it appears to be around the corner. Mostly I work with ARM and MIPS, hence these beginner questions. This particular project was for a demo at CES where a PIC connects to the serial console of a Linux/MIPS-based blu-ray player; I was creating a demo of our middleware product on that platform and getting it launched required attaching to the console and typing commands. No way of auto launching it without rebuilding a complete system (root cramfs), which is outlandishly complex due to secure boot and BD certificates having to match the 'dev' chips - instead I set a PIC to monitor the console, driving the demo and acting as a watchdog. This way I could put it in hands of marketing and sales people since all they'd have to do is push the power button to start it up. It all fit neatly inside the BD player case. SB C++ is a nice tool and C++ is great for code reuse. Wish it had namespaces though.
  3. The following code results in a linker error: // -*- c++ -*- // Device: PIC18F1320 #include <system.h> typedef unsigned char uint8_t; #include "usart.h" static Usart _usart; void main() { _usart.init(); for (;;) _usart.putc(_usart.getc()); // NOREACH } Header file (usart.h): class Usart { public: void init() { // SYNC=0, BRGH=1, BRG16=1 // SPBRG=16, -2.12% error txsta = 0x24; rcsta = 0x90; baudctl = 0x08; spbrg = 16; // 115.2k spbrgh = 0; } void putc(uint8_t c) { while (!txsta.TRMT) continue; txreg = c; } uint8_t getc() { while (!pir1.RCIF) continue; return rcreg; } uint8_t poll() { return !pir1.RCIF ? 0 : rcreg; } void puts(const rom char *s) { for (uint8_t i = 0; s[i]; ++i) putc(s[i]); } void puts(const char *s) { for (uint8_t i = 0; s[i]; ++i) putc(s[i]); } }; This results in undefined symbols when linking: Clean: Deleting intermediary and output files. Clean: Deleted file "bug.OBJ". Clean: Deleted file "C:\Documents and Settings\XXX\Desktop\bug\bug.HEX". Clean: Done. Executing: "C:\Program Files\SourceBoost\boostc++_pic18.exe" bug.c -O1 -W1 -t 18F1320 BoostC++ Optimizing C++ Compiler Version 6.96 (for PIC18 architecture) http://www.sourceboost.com Copyright(C) 2004-2009 Pavel Baranov Copyright(C) 2004-2009 David Hobday Licensed to XXX under Single user Pro License for 1 node(s) Limitations: PIC18 max code size:Unlimited, max RAM banks:Unlimited bug.c success Executing: "C:\Program Files\SourceBoost\boostlink_pic.exe" "C:\Documents and Settings\XXX\Desktop\bug\bug.obj" -O1 -p "bug" -t 18F1320 BoostLink Optimizing Linker Version 6.96 http://www.sourceboost.com Copyright(C) 2004-2009 Pavel Baranov Copyright(C) 2004-2009 David Hobday Optimisation level:1 Error: Unresolved external function:'class Usart:init()' Error: Unresolved external function:'class Usart:init()' Error: Unresolved external function:'class Usart:init()' Error: Unresolved external function:'class Usart:init()' Error: Unresolved external symbol, function:init failure BUILD SUCCEEDED: Wed Dec 30 23:52:27 2009 However, replace the #include "usart.h" with the contents of the include file directly and it links fine.
  4. Here's another question raised by using MPLAB 8.43... Whenever I build it always does a clean followed by a complete rebuild. I'm also unable to use settings presets (like Debug and Release) - the pulldown is disabled. Is this normal for third-party tools in MPLAB? I'd use the BoostSource IDE except I need ICD2 debugger integration. I suppose I could create plugins for the simulator for the LCD and peripherals, but that's clearly orthogonal to the task at hand.
  5. Here's probably a dumb question. Does BoostC++ expect extended mode instructions to be enabled in the device config? Also, I notice that libc's mul_*() routines use hardware multiply on PIC18 - while hw mul is a PIC18 extension if I understand correctly it's available regardless of whether extended instructions (XINST) is enabled in the device config? I guess this was really two dumb questions...
×
×
  • Create New...