Hey! i just had similar problem, so what you must do is calibrate ESC first, wich happens by listening ''beeps''
Try this first: try to find user manual/programming guide for that esc you are using, that helps a lot with programming, and perhaps picture too what esc looks like (is it blue-series hobbyking? i have blue myself and works like charm and easy to program)
BUT, if you can't find manual, what you could try is standard throttle calibration: if you know that your code will and can spin BLDC motor correctly and sends good pwm signal (pwm on-time is btw VERY small wime wich is sent to ESC) turn throttle fully on, THEN power on the esc. Now, after you hear beep from motor, turn esc down to minimun, then after a while, back to full. NOW, esc should have full range of pwm signal from esc and you can rank throttle slowly....very slowly, most escs have safety feature to prevent too much revving.
that's all i can say! hopefully you'll get it running